Google Maps SDK for iOS has pretty good method for calculation zoom value based on coordinate, distance in meters and length in pixels: zoomAtCoordinate:forMeters:perPoints:. But I can't find something similar at Google Maps SDK for Android. Also I can't find some workaround for that. Who faced such a task? Any solutions or ideas.
Asked
Active
Viewed 452 times
1
-
So basically you want to have the ratio between meters and pixels for a given zoom level, right? – Nicolás Carrasco-Stevenson Jun 23 '17 at 19:09
1 Answers
0
I don't think there's a dedicated function for setting the zoom level the way you mentioned, though I think your question is pretty much the same as this one.
In short, you can do something like this:
Circle circle = mGoogleMap.addCircle(new CircleOptions()
.center(new LatLng(0, 0))
.radius(getRadiusInMeters());
getZoomLevel(circle);
or you can try to calculate the right zoom level recursively as another answer in that thread mentioned which I do not recommend.

Iman Akbari
- 2,167
- 26
- 31