leaflet.PruneCluster 聚合.

leafletView = new PruneClusterForLeaflet();
$.each(data, function (index, item) {
    var m = new PruneCluster.Marker(item.x, item.y, item);
    leafletView.RegisterMarker(m);
});
map.addLayer(leafletView);

data             //数据源
item.x,item.y    //经纬度
map              //leaflet地图对象

Leaflet.PruneCluster文档

转载自:https://blog.csdn.net/qq_36658051/article/details/85261608

You may also like...