diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 054ff897..c9ea9d0c 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -877,7 +877,11 @@ U.Map = L.Map.extend({ if (importedData.geometry) this.options.center = this.latLng(importedData.geometry) const self = this importedData.layers.forEach((geojson) => { - delete geojson._umap_options['id'] // Never trust an id at this stage + if (!geojson._umap_options && geojson._storage) { + geojson._umap_options = geojson._storage + delete geojson._storage + } + delete geojson._umap_options?.id // Never trust an id at this stage const dataLayer = self.createDataLayer(geojson._umap_options) dataLayer.fromUmapGeoJSON(geojson) })