Leaflet: Update GeoJson filter?

后端 未结 3 1989
北海茫月
北海茫月 2020-12-28 16:53

I would like to populate a GeoJson layer with data and then dynamically filter what features to show.

I have gotten the filter function to work but I do not know how

3条回答
  •  情歌与酒
    2020-12-28 17:19

    See example below, you have a map and a myBus layer.

    map.removeLayer(myBus);
    
    ...add your data edit something ...
    
    myBus.addTo(map);
    

提交回复
热议问题