I\'m currently building a \'search an area\' feature for a site we\'re working on. A bit like the one on Rightmove.
I\'ve got everything up and running except the abilit
these events are defined for MVCArray, a polyline is not a MVCArray. You must observe the events for the path
of the polyline(which is a MVCArray) instead. Furthermore you can't add a listener to an object that isn't created yet. The polygon is not available before polygoncomplete
, so you must add the listeners inside the polygoncomplete-callback:
google.maps.event.addListener(drawingManager,'polygoncomplete',function(polygon) {
// complete functions
google.maps.event.addListener(thePath, 'set_at', function() {
// complete functions
});
google.maps.event.addListener(thePath, 'insert_at', function() {
// complete functions
});
});