Get marker coordinates relative to screen Google Maps API v3

As I understand it, jQuery cannot read Google Maps data. So is there a pure javascript way to get the coordinates of the marker relative to the screen? (top left ()). Thank.

EDIT: The projection class did this with the toScreenLocation () method in API v2, but how would I achieve the same in v3?

EDIT 2: I am using WebView from Android SDK to download the map.

For an answer see this: stackoverflow

+3


source to share


1 answer


Maybe try this?

var point;
var pointIWant = projection.fromLatLngToPoint(marker.getPosition(), point);

      



As per the Google Maps API Docs google.maps.Projection.fromLatLngToPoint () will convert the latitude / longitude coordinate to a point on the screen.

0


source







All Articles