I am following the MVCObject binding example from this page:
http://code.google.com/apis/maps/articles/mvcfun.html
I want to change the color of the circle a
To actually find out what is calling the function, use console.log(event) and check the developer tools console:
google.maps.event.addListener(circle, 'click', function()
{
alert('circle clicked');
console.log(event);
});
You should have 2 events listed (if they do trigger twice). Then check the "srcElement" attribute of the events to see what element had called the function.
From a similar issue of my own, I found that the Google maps event listener was not specific enough on what element would trigger the function. So I replaced the Google maps event listener with a JQuery event listener to be more specific and target a specific element by it's ID attribute.
Google Maps event listener (fired twice)
google.maps.event.addDomListener(control, 'click', function() { toggleLabels(); });
JQuery event listener (fired once)
$('body').on('click', '#labels-switch', function(){ toggleLabels(); });