ember-google-map
ember-google-map copied to clipboard
Show one infowindow at a time
If I add description
to each markers, and then click on every markers, all infowindows stay open.
I would like to show one infowindow at a time, as suggested in the Google Documentation regarding infowindow (https://developers.google.com/maps/documentation/javascript/infowindows#add)
Best practices: For the best user experience, only one info window should be open on the map at any one time. Multiple info windows make the map appear cluttered. If you only need one info window at a time, you can create just one InfoWindow object and open it at different locations or markers upon map events, such as user clicks. If you do need more than one info window, you can display multiple InfoWindow objects at the same time.
I can't find a way to do that. Any suggestion? Thanks
@thagul Did you figure out a way to make this happen?
No, I didn't find a way to do that and unfortunately I've no much time to dig any further. I'm very busy on more urgent issues on my project and this is not one of them
Ok, that's something I'll be adding in 0.1
. Basically (if someone wants to do a PR) it'd need a property on the google-map
component to point to the currently shown info-window, and in the info-window view, use that value to close the old one before updating that property with the new opening one. I know it might be a bit more complex, just no time to work on this now :-/
:+1: