If your Polygon is editable, you can add an event listener to the Polygon and then handle click or right clicks. For example:
poly = new google.maps.Polygon({
editable: true
});
poly.setMap(map);
google.maps.event.addListener(poly, 'rightclick', function(event) {
if (event.vertex == undefined) {
return;
} else {
removeVertex(event.vertex);
}
});
Above code would create a polygon and attach a event listener that catches right clicks on vertices (nodes) of the polygon and then call removeVertex function.
function removeVertex(vertex) {
var path = poly.getPath();
path.removeAt(vertex);
}
Similar solution can be applied for Polylines as well.