Rantiev
Rantiev

Reputation: 2262

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

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

Upvotes: 3

Views: 2530

Answers (1)

snkashis
snkashis

Reputation: 2991

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.

Upvotes: 3

Related Questions