Hi,
I would like to “access” the child nodes (squares) of a polyline in Google Maps v3. By access I mean delete this point from the polyline and auto reconnect the neighbors. Are there event listeners for “accessing” the nodes? I cannot find anything.
Thank you for you help!
//////////////////////////////////////////////////////////////////////////////////////////
Found the solution (JSFiddle):
var deleteNode = function(mev) {
if (mev.vertex != null) {
my_poly.getPath().removeAt(mev.vertex);
}
}
google.maps.event.addListener(my_poly, 'rightclick', deleteNode);
See the answer to this question for events available on editable polylines:
Google Maps Polyline click does not fire PolyMouseEvent