Javascript 过滤传单中的geojson点,而不对其进行聚类
我发现了一个如何使用滑块过滤传单点的方法 我想使用这个,但是没有MarkerCluster集群 但是我在JS中遇到了一个“太多递归”错误。请问我的密码有什么问题Javascript 过滤传单中的geojson点,而不对其进行聚类,javascript,leaflet,Javascript,Leaflet,我发现了一个如何使用滑块过滤传单点的方法 我想使用这个,但是没有MarkerCluster集群 但是我在JS中遇到了一个“太多递归”错误。请问我的密码有什么问题 var popplaces = new L.geoJson(exp_popplaces,{ onEachFeature: pop_popplaces, pointToLayer: popplaces_marker }); [……] slidervar.noUiSlider.on('update',函数(值,句柄){ 控
var popplaces = new L.geoJson(exp_popplaces,{
onEachFeature: pop_popplaces,
pointToLayer: popplaces_marker
});
[……]
slidervar.noUiSlider.on('update',函数(值,句柄){
控制台日志(句柄);
如果(句柄==0){
document.getElementById('input-number-min')。value=value[0];
}否则{
document.getElementById('input-number-max')。value=values[1];
}
rangeMin=document.getElementById('input-number-min')。值;
rangeMax=document.getElementById('input-number-max')。值;
////首先,让我们清除该层:
//cluster_popplaces.clearLayers();
popplaces.clearLayers();
////并重新填充它
popplaces=新的L.geoJson(exp_popplaces{
onEachFeature:pop_popplaces,
过滤器:
功能(特征、图层){
返回(feature.properties.pop_max=rangeMin);
},
pointToLayer:popplaces_标记
})
//然后再回到集群组
//簇_popplaces.addLayer(popplaces);
popplaces.addLayer(popplaces);
});
以下是我的完整来源:index\u raw\u cluster.html您不能向自身添加变量:
popplaces.addLayer(popplaces);
这确实是太多的递归
popplaces.addLayer(popplaces);