ember-google-map icon indicating copy to clipboard operation
ember-google-map copied to clipboard

Show one infowindow at a time

Open thagul opened this issue 9 years ago • 4 comments

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 avatar May 29 '15 15:05 thagul

@thagul Did you figure out a way to make this happen?

brandonparsons avatar Jun 06 '15 16:06 brandonparsons

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

thagul avatar Jun 08 '15 15:06 thagul

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 :-/

huafu avatar Jul 02 '15 12:07 huafu

:+1:

oswaldoacauan avatar Sep 04 '15 18:09 oswaldoacauan