egeloen/IvoryGoogleMapBundle — Issue #16: Closing other info windows when opening one
Author: wodor
Created: 2012-01-06 22:22:53+00:00
State: open

You could consider adding an option to map (?) , to allow only one info window to be opened.

this can be done by changing the way event is created
instead of

```javascript
var event_4f07735701880 = google.maps.event.addListener(marker_4f077356f28a6, "click", function(){info_window_4f077356f2a9b.open(tripsmap, marker_4f077356f28a6);});
```

you could create something like this
```javascript

var event_4f0772ee84f28 = google.maps.event.addDomListener(marker_4f0772ee84ce0, "click", function() {
if(openedInfoWindow !== undefined) {
openedInfoWindow.close();
}
info_window_4f0772ee84e10.open(tripsmap, marker_4f0772ee84ce0);
openedInfoWindow = info_window_4f0772ee84e10;
}, false);

```
(this code is not state-of-the-art but works)

the drawback is that there must exist 'openedInfoWindow' somewhere in global javascript scope , this is why I think that this should be option of Map.

and maybe there are cleaner solutions....