Posting my own solution (thanks to Eben Roux)...
var myMapOverlay;
MapOverlay.prototype = new google.maps.OverlayView();
MapOverlay.prototype.onAdd = function() { }
MapOverlay.prototype.onRemove = function() { }
MapOverlay.prototype.draw = function() { }
function MapOverlay(gmap) { this.setMap(gmap); }
in an onLoad call...
myMapOverlay = new MapOverlay(gmap);
Where you want the data...
var myPoint = new google.maps.Point(x,y);
var myLatLng =
myMapOverlay.getProjection().fromContainerPixelToLatLng(myPoint);
Thanks for trying to help Marcelo.
Jacob
On Mar 4, 12:33 pm, Jacob <[email protected]> wrote:
> Hi,
>
> I am trying to create a marker on a Google Map by dragging the Image
> of a marker from outside the map onto the map.
>
> Here is a simple map...http://testing.danwi.org/needHelp.html
>
> I can see two ways to do it. Projection to create a LatLng off of
> screen cords or creating a google maps event which has LatLngs in the
> event.
>
> I have not been able to figure out how to use Projection to turn a
> ScreenX, ScreenY into a LatLng.
> I have not been able to get the google api to trigger when I release
> the element above the gmap.
>
> If anyone knows how to use Projection -or- get an event to trigger
> which would have access to the LatLng of the mouse, I'd be grateful.
>
> Regards,
> Jacob
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.