Search code examples
google-mapsmarkercoordinate

Google Maps: Put Marker on Top Left of The Map


just like the title say, I know how to add marker on specific lat,lon. Now I want to add marker and put it on top left or top right of the map. How to accomplish this using javascript api v3 ?


Solution

  • http://code.google.com/apis/maps/documentation/javascript/reference.html#MapCanvasProjection

    fromDivPixelToLatLng(pixel:Point)
    

    Computes the geographical coordinates from pixel coordinates in the div that holds the draggable map.