Mashiane Expert Licensed User Longtime User Aug 7, 2016 #1 Hi there This tutorial bears reference https://www.b4x.com/android/forum/threads/google-maps.63930/ 1. I am able to add a marker to the map, how can I zoom into the added marker through code? 2. How can I also zoom into two added markers at different locations? e.g. for directions and perhaps draw a polyline between them?
Hi there This tutorial bears reference https://www.b4x.com/android/forum/threads/google-maps.63930/ 1. I am able to add a marker to the map, how can I zoom into the added marker through code? 2. How can I also zoom into two added markers at different locations? e.g. for directions and perhaps draw a polyline between them?
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2016 #2 1. Code: Copy Dim cp As CameraPosition cp.Initialize(Marker.Position.Latitude, Marker.Position.Longitude, 10) gmap.AnimateCamera(cp) 2. You can use GoogleMapExtra to zoom on a specific area. Use the two markers positions to calculate the desired area. Upvote 0
1. Code: Copy Dim cp As CameraPosition cp.Initialize(Marker.Position.Latitude, Marker.Position.Longitude, 10) gmap.AnimateCamera(cp) 2. You can use GoogleMapExtra to zoom on a specific area. Use the two markers positions to calculate the desired area.
warwound Expert Licensed User Longtime User Aug 7, 2016 #3 Mashiane said: 2. How can I also zoom into two added markers at different locations? Click to expand... Use GoogleMapsExtras and the LatLngBounds object, there's an example here: https://www.b4x.com/android/forum/threads/gmaps-zoom.34926/#post-204557 Upvote 0
Mashiane said: 2. How can I also zoom into two added markers at different locations? Click to expand... Use GoogleMapsExtras and the LatLngBounds object, there's an example here: https://www.b4x.com/android/forum/threads/gmaps-zoom.34926/#post-204557
Mashiane Expert Licensed User Longtime User Aug 8, 2016 #4 Erel said: 1. Code: Copy Dim cp As CameraPosition cp.Initialize(Marker.Position.Latitude, Marker.Position.Longitude, 10) gmap.AnimateCamera(cp) 2. You can use GoogleMapExtra to zoom on a specific area. Use the two markers positions to calculate the desired area. Click to expand... Thanks Erel, perfect!!! Upvote 0
Erel said: 1. Code: Copy Dim cp As CameraPosition cp.Initialize(Marker.Position.Latitude, Marker.Position.Longitude, 10) gmap.AnimateCamera(cp) 2. You can use GoogleMapExtra to zoom on a specific area. Use the two markers positions to calculate the desired area. Click to expand... Thanks Erel, perfect!!!