Closed jannisg closed 9 years ago
actually, this is what I'm after as well. My use case is that once the user places a marker on the map he gets an info window to confirm the placement is correct. Clicking either yes or no buttons should close the window and do something else. I tried events like 'closeinfowindow'.
hmm would one of you mind making a jsfiddle or plunker demonstrating the issue? Much easier to figure out what's wrong that way.
No response in almost a year--closing.
Love this module, thanks a bunch for maintaining it!
One thing I'm currently struggling with is closing an infoWindow only when needed but not always.
Let me explain:
{ visible: false }
to hide them thus only leaving the ones with matching type property on the map.Now what I would like to do is this: When I filter the markers, say "Show all Cafés" and I currently have an infoWindow open on a Café that would remain visible I do not want to close its infoWindow.
If I have an infoWindow open on a Supermarket however, that infoWindow should be closed as its marker gets hidden.
What I'm struggling with is the conditional removal/hiding of the infoWindow.
I've basically followed the instructions from #20 to set up a custom event which then fires
infoWindow.close()
however this closes all infoWindows regardless of the locations array I pass in (which filters out the one I want to leave open).Any ideas on how to only remove an infoWindow matching the location passed into the locations property when triggering a markerEvent would be much appreciated.
Code samples below:
Markers
Filter List
Marker Event related JS functions