On Jan 11, 10:52 am, matija <[email protected]> wrote:
> hi,
> i didnt find anywhere how to get lat&lon coordinates on map load. i
> have basic/simple map, with some center coordinates:
>
> this.map = new GMap2(document.getElementById('map'));
> this.map.setCenter(new GLatLng(46.1, 14.8), 6);
>
> u just wanted to get x/y of top left and bottom right, also at every
> move/zoom. thanks in advance!
> m

Returns the geographic coordinates of the viewport bounding box:
http://code.google.com/apis/maps/documentation/reference.html#GMap2.getBounds

http://code.google.com/apis/maps/documentation/reference.html#GMap2.fromLatLngToContainerPixel
Computes the pixel coordinates of the given geographical point in the
DOM element that contains the map on the page.

or
http://code.google.com/apis/maps/documentation/reference.html#GMap2.fromLatLngToDivPixel
Computes the pixel coordinates of the given geographical point in the
DOM element that holds the draggable map. You need this method to
position a custom overlay when you implement the GOverlay.redraw()
method for a custom overlay.

depending on what you mean by x/y...

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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