Yayou49 Active Member Licensed User May 17, 2017 #1 Hi, In one of my activities, I display a google Map. In this google map, I've added some markers. My question is: How to set automaticaly the maximum map's zoom to let all markers fit this zoom ???? In others words, if all my markers are within 5 km from Chicago, how to have a zoom to fit a square of 5km around Chicago ?..... (just one thing, markers are set randomly) Thx in advance to the community
Hi, In one of my activities, I display a google Map. In this google map, I've added some markers. My question is: How to set automaticaly the maximum map's zoom to let all markers fit this zoom ???? In others words, if all my markers are within 5 km from Chicago, how to have a zoom to fit a square of 5km around Chicago ?..... (just one thing, markers are set randomly) Thx in advance to the community
Erel B4X founder Staff member Licensed User Longtime User May 18, 2017 #2 You can use ZoomToBoundaries: https://www.b4x.com/android/forum/threads/google-maps-android-v2-tutorial.24415/page-2#post-146565 It is also available in GoogleMapsExtras library. You will need to calculate the boundaries. Upvote 0
You can use ZoomToBoundaries: https://www.b4x.com/android/forum/threads/google-maps-android-v2-tutorial.24415/page-2#post-146565 It is also available in GoogleMapsExtras library. You will need to calculate the boundaries.
Yayou49 Active Member Licensed User May 18, 2017 #3 Erel said: You can use ZoomToBoundaries: https://www.b4x.com/android/forum/threads/google-maps-android-v2-tutorial.24415/page-2#post-146565 It is also available in GoogleMapsExtras library. You will need to calculate the boundaries. Click to expand... This solution works perfectly !!! Thx Erel. Upvote 0
Erel said: You can use ZoomToBoundaries: https://www.b4x.com/android/forum/threads/google-maps-android-v2-tutorial.24415/page-2#post-146565 It is also available in GoogleMapsExtras library. You will need to calculate the boundaries. Click to expand... This solution works perfectly !!! Thx Erel.