【发布时间】:2016-05-27 10:55:32
【问题描述】:
我尝试了不同的方法来将集群与商店定位器同步。添加集群很容易,但是左侧的列表有一些问题。
我的问题是,我不确定如何集成此功能,最后商店定位器与自定义标记一起使用,并且列表以正确的方式同步。
商店定位器: https://jsfiddle.net/sd5vt439/
L.mapbox.featureLayer('examples.map-h61e8o8e').on('ready', function(e) {
var clusterGroup = new L.MarkerClusterGroup();
e.target.eachLayer(function(layer) {
clusterGroup.addLayer(layer);
});
map.addLayer(clusterGroup);
});
【问题讨论】:
标签: leaflet mapbox geojson marker markerclusterer