I am using RichMarker for Google Maps v3 as found at https://googlemaps.github.io/js-rich-marker/reference.html
I have successfully been able to register clicking on the marker with this code:
google.maps.event.addListener(this.richMarker, 'click', function(event) {
console.log("click made on marker");
});
However the click also falls through the marker, so it registers a click on whatever falls behind it. ie the map, if it has a handler:
google.maps.event.addListener(map, 'click', function(event) {
console.log("click made on map");
});
Or a polygon if it is clickable.
How can I prevent this fall through click with RichMarker?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…