0

私は現在、次のように、GeoJSON ファイルからデータを取得してクラスター化する Leaflet マップを持っています。

var markers = L.markerClusterGroup({
    showCoverageOnHover: true,
    spiderfyOnMaxZoom: true  
});

var geoJsonLayer = L.geoJson(thefts, {
    onEachFeature: function (feature, layer) {
        layer.bindPopup(feature.properties.bike_value);
    }
});

markers.addLayer(geoJsonLayer);
map.addLayer(markers);
map.fitBounds(markers.getBounds());

真ん中の部分は、私にいくつかの問題を引き起こしているものです:

var geoJsonLayer = L.geoJson(thefts, {
    onEachFeature: function (feature, layer) {
        layer.bindPopup(feature.properties.bike_value);
    }
});

ポップアップをクリックしようとするたびに、Uncaught Error: NotFoundError: DOM Exception 8というコンソール エラーが表示されます。エラー スタックは次のようになります。

Uncaught Error: NotFoundError: DOM Exception 8 leaflet.js:7
    o.Popup.o.Class.extend.onRemove leaflet.js:7
    o.Map.o.Class.extend.removeLayer leaflet.js:6
    o.Map.include.closePopup leaflet.js:7
    o.Popup.o.Class.extend._close leaflet.js:7
    o.Marker.include.closePopup leaflet.js:7
    o.Marker.include.togglePopup leaflet.js:7
    o.Mixin.Events.fireEvent leaflet.js:6
    o.Marker.o.Class.extend._onMouseClick leaflet.js:7
    t.(anonymous function).s

これを引き起こしている可能性のあるものについて何か考えはありますか? DOM Exception 8 に関連する他の質問があったことは知っていますが、私が行っていることに関連するものは何も見つかりませんでした。

4

0 に答える 0