3

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

Rantiev
  • 2,121
  • 2
  • 32
  • 56
  • Does this answer your question? [How to close all popups programmatically in mapbox gl?](https://stackoverflow.com/questions/40859195/how-to-close-all-popups-programmatically-in-mapbox-gl) – squarecandy Jul 24 '20 at 18:52

1 Answers1

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.

snkashis
  • 2,951
  • 1
  • 18
  • 35