When I'm drawing a polygon with Google Maps Api DrawingManager, I use the event listener 'polygoncomplete
' to do some actions:
google.maps.event.addListener(drawingManager, 'polygoncomplete', function(poly) {
// Some actions here...
}
Sometimes, especially using the Apple Pencil on iPadPro, the event raises even when not expected: usually it is because I place two vertex one next to the other (but not so much as expected to close polygon).
I wonder if there is a way to control the 'double-click' sensitivity to raise the polygoncomplete event, or if there is a workaround to raise the event in a custom way (ex. clicking a button).
From This
question I understand (and tried too) that preventDefault
and stopPropagation
are not working if used in Maps Api events.