Removing leaflet layers and L.marker method

前端 未结 3 716
生来不讨喜
生来不讨喜 2021-02-01 22:23

I was wondering if anyone knows how or if you can actually remove a layer of points after adding them using this convention:

var pointsLayer, someFeatures = [{
          


        
3条回答
  •  伪装坚强ぢ
    2021-02-01 23:06

    Use map.removeLayer():

    var circle = L.circle([lat, lng], 1000).addTo(map);
    map.removeLayer(circle);
    

提交回复
热议问题