On Oct 16, 1:49 pm, Esa <[EMAIL PROTECTED]> wrote:
> I don't know if this has anything to do with the trouble.
>
> Every time a marker is clicked, a new 'infowindowclose' listener is
> created.
>
> Try moving the second event listener outside the first one.
Hi Esa. When I move the second listener outside of the first one, it's
triggered many (>10) times for some reason.
However, I just figured out that if I do this, then the
'infowindowclose' listener executes if the info window is closed by
the user clicking on the map:
GEvent.addListener(marker, 'click', function() {
// Do custom stuff here.
marker.openInfoWindowHtml('Info window contents');
});
GEvent.addListener(marker, "infowindowclose", function() {
// Do custom stuff here.
});
Cheers,
Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---