On 4 November 2010 12:31, parky128 <[email protected]> wrote: > Hi, > > Is there a way via the API, to replicate the functionality you get when > using the MyMaps add marker tool? So a marker icon\control which appears on > the map which the user can use to click and drag so they can drop a marker > anywhere they wish?
I couldn't make a marker draggable from *outside* the map and have it land in the right place in the map itself. I did this: http://www.acleach.me.uk/gmaps/draggableobject.htm which works because the map is sized at 100%. Drag the marker from the top left to where you want it. On dragend, the code calculates where the tip of the marker is and creates a new marker at that point, then moves the draggable object back to where it came from. The new marker created is an ordinary marker, so that could be made draggable too, I suppose, in order to fine-tune its position. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
