leaflet.deflate可以访问L.markerclustergroup

问题描述

我在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 (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...