Anyone have an idea how to make the CodeIgniter Google Maps API v3 library only allow a single info window to be open, and also to make it hide thei nfo window when clicking outside of the info window.
Library: http://www.in-the-attic.co.uk/2010/08/03/google-map-library-for-codeigniter-example-usage-update/
I ended up using a third party plugin called
infoBubbles.js
to generate some custom infoWindows. Rather than generating an infoBubble for each marker I create a variable, and passed the infoBubbles content throughgoogle.maps.marker();
. I then stored the markers in an array and when clicked it would go through the array and display the bubble.Here is the full code:
If you want only one info window to display at a time (as this is the behavior of Google Maps), you should create only one instance info window.
Hope it helps