Loading js/leaflet_geojson.bbox.js +10 −1 Original line number Diff line number Diff line Loading @@ -196,9 +196,18 @@ for (key in myFeatures) { if ({}.hasOwnProperty.call(myFeatures, key)) { var geojsonLayer = new L.GeoJSON(myFeatures[key], Drupal.leafletBBox.geoJSONOptions); // to cluster on external data source, see https://www.drupal.org/project/leaflet_geojson/issues/3303759 if (typeof L.markerClusterGroup() === 'object') { var markerClusterGroup = L.markerClusterGroup(); markerClusterGroup.addLayer(geojsonLayer); layerGroup.addLayer(markerClusterGroup); } else { layerGroup.addLayer(geojsonLayer); } } } // TODO: would probably fail with multiple layers, to improve. $('.block-map-loading-wrapper').hide(); Loading Loading
js/leaflet_geojson.bbox.js +10 −1 Original line number Diff line number Diff line Loading @@ -196,9 +196,18 @@ for (key in myFeatures) { if ({}.hasOwnProperty.call(myFeatures, key)) { var geojsonLayer = new L.GeoJSON(myFeatures[key], Drupal.leafletBBox.geoJSONOptions); // to cluster on external data source, see https://www.drupal.org/project/leaflet_geojson/issues/3303759 if (typeof L.markerClusterGroup() === 'object') { var markerClusterGroup = L.markerClusterGroup(); markerClusterGroup.addLayer(geojsonLayer); layerGroup.addLayer(markerClusterGroup); } else { layerGroup.addLayer(geojsonLayer); } } } // TODO: would probably fail with multiple layers, to improve. $('.block-map-loading-wrapper').hide(); Loading