leaflet控制矢量图层 单个面/矢量的显示与隐藏

单个矢量的类型是feature,但是没有直接的属性控制其显示与隐藏、

通过layer的setwhere设置其where函数,api会自动重新刷新达到效果

evt.layer.feature.properties.OBJECTID 是拿到对应feature的某个唯一的属性来过滤

 //layerAll[1].setWhere("NDJH_ID='"+allurl.params.id+"' and OBJECTID!=" +evt.layer.feature.properties.OBJECTID)

猜你喜欢

转载自blog.csdn.net/A873054267/article/details/83929395