From de907dcb500917b525c8d736b17c2fd672ae832e Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 8 Sep 2023 07:26:12 +0200 Subject: [PATCH] Do not expose readonly datalayers for features --- umap/static/umap/js/umap.forms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 587549a5..5e5525bc 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -396,7 +396,7 @@ L.FormBuilder.DataLayerSwitcher = L.FormBuilder.Select.extend({ getOptions: function () { const options = [] this.builder.map.eachDataLayerReverse((datalayer) => { - if (datalayer.isLoaded() && !datalayer.isRemoteLayer() && datalayer.canBrowse()) { + if (datalayer.isLoaded() && !datalayer.isReadOnly() && datalayer.canBrowse()) { options.push([L.stamp(datalayer), datalayer.getName()]) } })