Fix max not loading when defaultView=latest and datalayer has no data
When the default datalayer has no data, we need a fallback fix #1374
This commit is contained in:
parent
219b3e17dd
commit
47e5a0676a
1 changed files with 1 additions and 0 deletions
|
@ -697,6 +697,7 @@ L.U.Map.include({
|
||||||
const datalayer = this.defaultDataLayer(),
|
const datalayer = this.defaultDataLayer(),
|
||||||
feature = datalayer.getFeatureByIndex(-1)
|
feature = datalayer.getFeatureByIndex(-1)
|
||||||
if (feature) feature.zoomTo()
|
if (feature) feature.zoomTo()
|
||||||
|
else this._setDefaultCenter()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this._setDefaultCenter()
|
this._setDefaultCenter()
|
||||||
|
|
Loading…
Reference in a new issue