Merge pull request #1163 from umap-project/fix-1042

Pass options at datalayer creation when importing from umap file
This commit is contained in:
Yohan Boniface 2023-06-23 08:12:21 +02:00 committed by GitHub
commit d16feca225
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1038,7 +1038,7 @@ L.U.Map.include({
if (importedData.geometry) this.options.center = this.latLng(importedData.geometry) if (importedData.geometry) this.options.center = this.latLng(importedData.geometry)
const self = this const self = this
importedData.layers.forEach((geojson) => { importedData.layers.forEach((geojson) => {
const dataLayer = self.createDataLayer() const dataLayer = self.createDataLayer(geojson._umap_options)
dataLayer.fromUmapGeoJSON(geojson) dataLayer.fromUmapGeoJSON(geojson)
}) })