You need to set event listeners on the polygon path.
You can use the forEach () method of MVCArray to specify each path of your polygon.
function initialize() { var mapOptions = { zoom: 4, center: new google.maps.LatLng(40, 9), mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); var polygon = new google.maps.Polygon({ editable: true, strokeOpacity: 0, strokeWeight: 0, fillColor: '#00FF00', fillOpacity: .6, paths: [ new google.maps.LatLng(39, 4), new google.maps.LatLng(34, 24), new google.maps.LatLng(43, 24), new google.maps.LatLng(39, 4)], map: map }); // Get paths from polygon and set event listeners for each path separately polygon.getPaths().forEach(function (path, index) { google.maps.event.addListener(path, 'insert_at', function () { console.log('insert_at event'); }); google.maps.event.addListener(path, 'remove_at', function () { console.log('remove_at event'); }); google.maps.event.addListener(path, 'set_at', function () { console.log('set_at event'); }); }); } initialize();
Jsfiddle demo
source share