views:

60

answers:

1

Hello,

I was wondering if there was any way (I'm somewhat a newbie at Java) to get the MapBounds of a Google MapView on Android.

Just to clarify, here's what I'd like to do.

Calculate the maximum and minimum long and lat whenever the map is moved, or zoomed and display those values in a Toast.

Is there any possible way to do this -- or am I in over my head?

+2  A: 

You should be able to use

mapView.getLatitudeSpan();
mapView.getLongitudeSpan();

in combination with

mapView.getCenter();

to figure out the visible area.

But I've noticed some users had issues with it.

http://stackoverflow.com/questions/2667386/mapview-getlatitudespan-and-getlongitudespan-not-working

You should check the android developer group as well maybe.

Mathias Lin
Thanks, with those two commands and the point that I got from the locationManager service, things are working pretty well.
hwrdprkns