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:
commit
cfde325d86
1 changed files with 1 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue