Clear Marker Layers (Leaflet )

前端 未结 3 2005
春和景丽
春和景丽 2020-12-16 16:54

I am using Leaflet library and stuck with following issue: To generate Map i am calling map function on button click. So on each generatemap function call, I want to clear

3条回答
  •  一向
    一向 (楼主)
    2020-12-16 17:17

    You can use this

    $(".leaflet-marker-icon").remove(); $(".leaflet-popup").remove();

提交回复
热议问题