In your HTML have a named element that's going to receive the data, e.g.
<input id="geo" type="text" size=60/>
In you Javascript, listen for the "drag" event, read the marker
location, and put the information into the HTML element you prepared
earlier:
GEvent.addListener(marker,"drag", function() {
var lat = marker.getLatLng().lat();
var lng = marker.getLatLng().lng();
document.getElementById("geo").value =
"geo:lat=" + lat +" gel:lon=" +lng;
})
If you're only interested in the final location, you can listen for
"dragend" instead of "drag".
--
Mike Williams
http://econym.org.uk/gmap
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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
-~----------~----~----~----~------~----~------~--~---