I\'m trying to create an editable polygon in google maps that on change, returns the Geo Coordinates of the polygon. At the following JS Fiddle, you\'ll notice if you create a t
There is a drag event on polygon. It should be attached using google.maps.event.addListener not google.maps.event.addDomListener. More about polygon events here in the docs (scroll lower to Events).
This works:
function overlayClickListener(overlay) {
google.maps.event.addListener(overlay, "drag", function(event){
console.log("Changing this guy!");
$('#vertices').val(overlay.getPath().getArray());
});
}