Dear all,
I have come across a issue with the getPoint()-method and I hope that
someone can help me.
I need to allocate a hidden textfield with the lat and another hidden
textfield with lng. When dragging the marker the lat/lng changes but I
get both lng and lat in the same textfield. I need them in one each. I
see the lng/lat changes in the textfield when moving around the
marker...but as said...I need it seperated.
I appriciated any help...
Thank you.
/Nimrod
function place(lat,lng) {
var point = new GLatLng(lat,lng);
map.setCenter(point,14);
var marker=(new GMarker(point, {draggable: true}));
map.addOverlay(marker);
marker.enableDragging();
GEvent.addListener(marker, "drag", function(){
document.getElementById("lat").value=marker.getPoint().lat();
document.getElementById("lng").value=marker.getPoint().lng();
});
document.getElementById("message").innerHTML = "";
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---