我有一个集群中有很多标记的地图,带有markercluster插件(由于.JS文件中的geojson作为变量,我创建了它),并且我试图能够使用zoom/动态修改URL哈希使用 Hashable.js 的 lat/lng 但每次我用超过 40.000 个标记的 geojson 加载我的网站时,markercluster 和 hashable 之间似乎存在冲突。这是我得到的错误:
leaflet-src.js:1905 Uncaught TypeError: Cannot read property 'lat' of undefined
at L.LatLngBounds.intersects (leaflet-src.js:1905)
at NewClass._recursively (leaflet.markercluster-src.js:1763)
at NewClass._recursivelyRemoveChildrenFromMap (leaflet.markercluster-src.js:1712)
at NewClass._moveEnd (leaflet.markercluster-src.js:921)
at NewClass.fire (leaflet-src.js:587)
at NewClass.panBy (leaflet-src.js:2575)
at NewClass._tryAnimatedPan (leaflet-src.js:3770)
at NewClass.setView (leaflet-src.js:2460)
at Object.<anonymous> (index.js:85)
at change (hashable.min.js:1)