diff --git a/umap/settings/base.py b/umap/settings/base.py index 6c1a84d7..86b50fe1 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -249,6 +249,7 @@ DATABASES = { } UMAP_DEFAULT_SHARE_STATUS = None UMAP_DEFAULT_EDIT_STATUS = None +UMAP_DEFAULT_FEATURES_HAVE_OWNERS = True UMAP_READONLY = env('UMAP_READONLY', default=False) UMAP_GZIP = True diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 27414e33..18641b9f 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -108,6 +108,7 @@ L.U.Map.include({ L.Util.setBooleanFromQueryString(this.options, 'displayCaptionOnLoad') L.Util.setBooleanFromQueryString(this.options, 'captionBar') L.Util.setBooleanFromQueryString(this.options, 'captionMenus') + L.Util.setBooleanFromQueryString(this.options, 'featuresHaveOwners') for (let i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { L.Util.setNullableBooleanFromQueryString( this.options, @@ -1112,6 +1113,7 @@ L.U.Map.include({ 'filterKey', 'facetKey', 'slugKey', + 'featuresHaveOwners', 'showLabel', 'labelDirection', 'labelInteractive', @@ -1457,6 +1459,12 @@ L.U.Map.include({ label: L._('Feature identifier key'), }, ], + [ + 'options.featuesHaveOwners', + { + handler: 'Switch', label: L._('Features have owners') + }, + ], ] builder = new L.U.FormBuilder(this, optionsFields, { diff --git a/umap/views.py b/umap/views.py index f33296d9..58c02797 100644 --- a/umap/views.py +++ b/umap/views.py @@ -509,6 +509,7 @@ class MapDetailMixin: "properties": { "zoom": getattr(settings, "LEAFLET_ZOOM", 6), "datalayers": [], + "features_have_owners": settings.UMAP_DEFAULT_FEATURES_HAVE_OWNERS, }, }