Add FeaturesHaveOwners map option.
WIP
This commit is contained in:
parent
e76c147b65
commit
e25fb5d04f
3 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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, {
|
||||
|
|
|
@ -509,6 +509,7 @@ class MapDetailMixin:
|
|||
"properties": {
|
||||
"zoom": getattr(settings, "LEAFLET_ZOOM", 6),
|
||||
"datalayers": [],
|
||||
"features_have_owners": settings.UMAP_DEFAULT_FEATURES_HAVE_OWNERS,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue