Hi

 > After you create a marker, add this code to your setup:
 >
 >
 > GEvent.addListener(marker, \"infowindowclose\", function() {
 >        map.setCenter(mapbounds.getCenter(), map.getBoundsZoomLevel
 > (mapbounds))
 >   });

slightly more elaborate, I do this:

// if someone opens a balloon, store the maps position
google.maps.Event.addListener(map, "infowindowopen", function() {
        map.savePosition();
});

// if someone closes a balloon, return to that position
google.maps.Event.addListener(map, "infowindowclose", function() {      
        map.returnToSavedPosition()
});

"map" should be a global refering to your
instance of a google map.

$2c,
*-pike

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to