Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/400.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 过滤传单中的geojson点,而不对其进行聚类_Javascript_Leaflet - Fatal编程技术网

Javascript 过滤传单中的geojson点,而不对其进行聚类

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',函数(值,句柄){ 控

我发现了一个如何使用滑块过滤传单点的方法

我想使用这个,但是没有MarkerCluster集群

但是我在JS中遇到了一个“太多递归”错误。请问我的密码有什么问题

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);