Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  12] [ 6]  / answers: 1 / hits: 162958  / 15 Years ago, mon, february 8, 2010, 12:00:00

On my site, I'm using Google Maps API v3 to place house markers on the map.



The InfoWindows stay open unless you explicitly click the close icon. Meaning, you can have 2+ InfoWindows open at a time if you hover over the map marker.



Question: How do I make it so that only the current active InfoWindow is open and all other InfoWindows are closed? Meaning, no more than 1 InfoWindow will be open at a time?


More From » google-maps

 Answers
19

There is a close() function for InfoWindows. Just keep track of the last opened window, and call the close function on it when a new window is created.


[#97634] Thursday, February 4, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ignacio

Total Points: 467
Total Questions: 128
Total Answers: 79

Location: Luxembourg
Member since Tue, Mar 14, 2023
1 Year ago
ignacio questions
;