Reputation: 5361
I've looked around and realized that I can define a polygon, and have a click event that only happens when a user clicks within the polygon like this:
polygonClick = google.maps.event.addListener( polygon, "click", function( evt ) {
function();
} );
What I would like to do is to have a listener that listens everywhere OTHER than inside the polygon, something like this:
polygonClick = google.maps.event.addListener( !polygon, "click", function( evt ) {
function();
} );
Is this possible? Thanks
Upvotes: 1
Views: 926
Reputation: 161324
Create a listener on the map.
mapClick = google.maps.event.addListener( map, "click", function( evt ) {
function();
} );
Upvotes: 4