You don't need the API to trigger any events when you release the marker. The event that starts your processing is the mouseup or dragend on the marker image. When that event triggers you need to get the mouse position relative to the map, in pixels, and then you can use an external MercatorPtrojection object, from this example: http://code.google.com/apis/maps/documentation/v3/examples/map-coordinates.html to obtain the lat/lon where to create a real marker.
I have a V2 example which I made years ago and the code is a bit messy: http://maps.forum.nu/gm_user_defined_marker.html I am using an external library to handle the drag events because back then, there wasn't any GDraggableObject , (or I wasn't aware of it). The juicy part is between lines 500 and 600 of the html file, and in the external file dragHandler.js, which I don't remember where I got it from. -- Marcelo - http://maps.forum.nu -- On Mar 4, 6: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.
