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

限于喜欢 提交于 2019-12-12 12:33:33

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/40849927/how-to-hide-all-opened-marker-popups-in-mapbox-gl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!