1

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.

Igor Tyulkanov
  • 5,487
  • 2
  • 32
  • 49

1 Answers1

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