How to hide all opened marker popups in mapbox-gl?
Asked Answered
W

1

3

I can't find the way to hide all opened marker popups or even check marker popup state.

Weingarten answered 28/11, 2016 at 17:15 Comment(1)
Does this answer your question? How to close all popups programmatically in mapbox gl?Perspiratory
P
3

I would think getPopup().isOpen() would allow you to check state, and getPopup().remove()(ran while iterating over all of your stored markers in some array) would accomplish what you need here.

Posada answered 1/12, 2016 at 15:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.