-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[question] Is it possible to show infowindow only one at a time? #186
Comments
Yes, I actually do this myself. You can also use with markers and only show a window that is active by tracking a collection of activeMarkers. If you only want one active then only one object in your collection should allow show to be true. |
Go here and search for epiphany . #83 |
thanks @nmccready! it works really well. 👍 |
I am trying to get the same result but using window, marker and ng-repeat. How would I go on changing the following so that only one info window is shown at a time? The problem here is that I am getting coordinates from a result array and that doesn't have any extra fields for me to track whether an exisiting window attached to that is open, so my show attribute is linked to a single field in the scope which either shows all the info windows or closes them. How can I open only one at a time? <marker
ng-repeat="result in results"
coords="result.coords"
click="onMarkerClicked(result)">
<window ng-cloak
show="map.infoWindowWithCustomClass.show"
isIconVisibleOnClick="true"
options="map.infoWindowWithCustomClass.options">
<div>
Window Content
</div>
</window>
</marker> |
Hi. I created markers and infowindows using
<markers>
and<windows>
directives. So when I click on a marker, it shows the marker's infowindow. But when I click on another marker, I'd like it to close opened window before open a new one. So there is only 1 window opened at a time. (I'm doing a mobile web so there is not that much spaces to show many things.)Is it possible to implement like this? I was thinking about attaching a click event to each marker and so when it's clicked, I'll close opened window first (if any) but still don't have ideas how to access to those windows and call a close function on them.
here's my code
and in the controller
The text was updated successfully, but these errors were encountered: