Wasn't it patfee who wrote:
>
>Thanks for the tips!
>
>solution used is to add two events triggering a global boolean
>"no_update";
>
>GEvent.addListener(marker, "infowindowopen", function() { no_update =
>true; });
>GEvent.addListener(marker, "infowindowclose", function() { no_update =
>false; });
>
>in the moveend listener
>GEvent.addListener(map, "moveend", no_update_checker);
>i refer to a function which checks the status of the no_update
>boolean:
>
>function infowindow_checker() {
>if (no_update) {
> } else {
> updateMarkers();
> }
>}
>
>works nicely!
Doesn't that miss the situation where the user drags or zooms the map
while an old info window is still open? You should at least unset the
flag when a no_update move occurs, but even then you'd miss a one user
move if the user moved or zoomed the map just after an info window
happened to open without moving the map.
I recommend also listening for the "dragend" event, which you get when
the user drags the map, but not when the info window moves the map.
If you're using GSmallZoomControl() then you could rely entirely on
"dragend" and "zoomend" listeners, but with any other MapControl you'd
miss the situation where the user clicks on the MapControl pan icons to
pan the map.
I suspect that the only perfect solution would be to write your own
custom MapControl that triggers custom events when used to pan the map.
Then you could just listen for "dragend", "zoomend" and those custom
events. Even then, all bets are off if you disable double click zoom.
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---