Merge pull request #1375 from umap-project/latest-without-data

Fix max not loading when defaultView=latest and datalayer has no data
This commit is contained in:
Yohan Boniface 2023-10-24 16:34:27 +02:00 committed by GitHub
commit cfde325d86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -697,6 +697,7 @@ L.U.Map.include({
const datalayer = this.defaultDataLayer(),
feature = datalayer.getFeatureByIndex(-1)
if (feature) feature.zoomTo()
else this._setDefaultCenter()
})
} else {
this._setDefaultCenter()