I have a map and multiple markers on that. I have already attached a click event on the map container to disappearing whatever is shown over the map (I have legends, timeline, etc.) using animation.
My problem is when you click on a marker to see the infoWindow, it also triggers the click event on the map, which disappearing over layer objects on the map. So, I want to prevent the map container already assigned event, when clicking on a marker, so only infoWindow would appears and nothing else.
Here is map click event:
$('#map_canvas').bind('mousedown', function() { ...
The only thing I can see on the markers, is that they all have the same class: gmnoprint
I’ve already tested this one:
$('#map_canvas').not('.gmnoprint').bind('mousedown', function() { ...
and:
$('#map_canvas').bind('mousedown', function() {
if ($(this).is('.gmnoprint'))
return false;
....
But none of them worked. Anyone knows how to solve the problem?
Thanks in advance!
Your problem is
those markers/info windows are in that map_canvas div, so your technically clicking on it