diff --git a/umap/static/umap/js/modules/data/layer.js b/umap/static/umap/js/modules/data/layer.js index fb1fac9f..f1f7e627 100644 --- a/umap/static/umap/js/modules/data/layer.js +++ b/umap/static/umap/js/modules/data/layer.js @@ -283,7 +283,7 @@ export class DataLayer { } hasDynamicData() { - return !!this.options.remoteData?.dynamic + return this.isRemoteLayer() && Boolean(this.options.remoteData?.dynamic) } async fetchRemoteData(force) { diff --git a/umap/static/umap/js/modules/rendering/layers/base.js b/umap/static/umap/js/modules/rendering/layers/base.js index d20b5ea2..25951a27 100644 --- a/umap/static/umap/js/modules/rendering/layers/base.js +++ b/umap/static/umap/js/modules/rendering/layers/base.js @@ -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() } },