问题描述
我在L.deflate中添加了一个geojson,它将所有geojson对象聚类。效果很好。
我的问题是我想添加需要访问L.markerclustergroup的Leaflet.MarkerCluster.Freezable
这是我关于如何实现它的想法:
let features = L.deflate({minSize: 20,markerCluster: true}) //add deflate and cluster
new L.GeoJSON(getGeoJson()).addTo(features); //add geojson
features.addTo(mapRef.current?.leafletElement) //addto map
features.eachLayer(function (layer) {
layer.on("click",e => {features.markerClusterGroup.freezeAtZoom(15)}) //here is where i need access to markerClusterGroup to use the markercluster.freezable
})
有人知道如何从L.deflate访问markerClusterGroup吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)