fix: do not redraw remote layer if not dynamic

This commit is contained in:
Yohan Boniface 2024-08-30 16:03:14 +02:00
parent a45f6ddbe5
commit b895013709
2 changed files with 2 additions and 2 deletions

View file

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

View file

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