Javascript 单张及;标记集群插件
我希望你能帮忙,我是新手 我目前正在使用传单滑块插件填充一些geoJson数据。这是非常好的,但是当数据集变大时,性能会受到很大影响。我真的很想使用这个插件与传单标记集群,以提高性能和用户界面。偏离Github上的说明这是我目前正在做的:Javascript 单张及;标记集群插件,javascript,jquery-ui,leaflet,geojson,Javascript,Jquery Ui,Leaflet,Geojson,我希望你能帮忙,我是新手 我目前正在使用传单滑块插件填充一些geoJson数据。这是非常好的,但是当数据集变大时,性能会受到很大影响。我真的很想使用这个插件与传单标记集群,以提高性能和用户界面。偏离Github上的说明这是我目前正在做的: var capacity = capacityData //geojson ref var markers = L.markerClusterGroup(); var geoJsonLayer = L.geoJson(capacity);
var capacity = capacityData //geojson ref
var markers = L.markerClusterGroup();
var geoJsonLayer = L.geoJson(capacity);
markers.addLayer(geoJsonLayer);
var layerGroup = L.layerGroup([markers]);
//Create a marker layer (in the example done via a GeoJSON FeatureCollection)
var testlayer = geoJsonLayer;
var sliderControl = L.control.sliderControl({ position: "topright", layer: layerGroup, range: true});
//Make sure to add the slider to the map
map.addControl(sliderControl);
//And initialize the slider
sliderControl.startSlider();
这将以标记簇格式获取地图上填充的数据,但滑块不起作用?任何帮助或指导都将不胜感激
您的GeoJSON层是否在属性中包含时间值?你能把它的一部分粘贴进去吗?是的。我有一个时间属性,如果我只使用geojson layer.var capacityData={“type”:“FeatureCollection”,“features”:[{“type”:“Feature”,“properties”:{“time”:“2016-03-24 15:55:58”},“geometry”:{“type”:“Point”,“坐标”:[lng here,lat here]},这个问题解决了吗?