Merge pull request #2084 from umap-project/remote-onmoveend

fix: do not redraw remote layer if not dynamic
This commit is contained in:
Yohan Boniface 2024-08-30 16:32:13 +02:00 committed by GitHub
commit 42e83de0f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -283,7 +283,7 @@ export class DataLayer {
}
hasDynamicData() {
return !!this.options.remoteData?.dynamic
return this.isRemoteLayer() && Boolean(this.options.remoteData?.dynamic)
}
async fetchRemoteData(force) {

View file

@ -47,7 +47,7 @@ export const LayerMixin = {
dataChanged: () => {},
onMoveEnd: function () {
if (this.datalayer.isRemoteLayer() && this.datalayer.showAtZoom()) {
if (this.datalayer.hasDynamicData() && this.datalayer.showAtZoom()) {
this.datalayer.fetchRemoteData()
}
},