On Jan 6, 2:09 am, Fliip <[email protected]> wrote:
>
> Is there any way of getting the GPS coordinates of the 4 corners of
> the map?

map.getBounds()

http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.getBounds

returns a GLatLngBounds object, so you can get opposite corners like

map.getBounds().getSouthWest()

http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLngBounds.getSouthWest

which returns a GLatLng object, so you can get its latitude (for
example)

map.getBounds().getSouthWest().lat()

http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLng.lat

and then repeat for getNorthEast()'s longitude and latitude. You can
construct the northwest and southeast corners from the relevant parts
of the other corners, if you need those. But you probably just need
the edges of the map, for which you only need two corners.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to