Android Question Google Maps Ideal zoom

Davisbc

Member
Licensed User
Does anyone have suggestions or code to calculate ideal camera (lat, lng, zoom) for a specific bounding box (BBOX)? I know i can force fit using the number of degrees Lat and lng (from the BBOX), but it seems there should be a more elegant method.

Thanks in advance,
B
 

TILogistic

Expert
Licensed User
Longtime User
Look at this example and it will give you an idea of how to do it.

Luberary: GoogleMapsExtras
LatLngBoundsBuilder



Google automatically calculates:
Center
Ideal zoom
Perfect screen fit

Search:
 
Last edited:
Upvote 0
Top