How to get Latitude/Longitude span in Google Map V2 for Android
android, google-maps, google-maps-android-api-2
Solution
You can use the following code to get the lat/lng span:
VisibleRegion vr = mMap.getProjection().getVisibleRegion();
double left = vr.latLngBounds.southwest.longitude;
double top = vr.latLngBounds.northeast.latitude;
double right = vr.latLngBounds.northeast.longitude;
double bottom = vr.latLngBounds.southwest.latitude;
I hope this helps.
Problem
I have a task for move my app to Google Maps Android APIs V2. Now, I need to get Latitude/Longitude span. I used `MapView.getLatitudeSpan()` and `MapView.getLongitudeSpan()` in previous version APIs. Now I can't find something like this in V2. Does anybody have the same problem?