forked from MapComplete/MapComplete
Feature: add more vector layers from maptiler; add some fixes to theme setting handler
This commit is contained in:
parent
94f9fe7b5f
commit
b3edbe846c
18 changed files with 155 additions and 99 deletions
|
@ -24,7 +24,7 @@
|
|||
"_mastodon_candidate_a=(feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName(\"a\")).filter(a => a.href.match(/mastodon|en.osm.town/) !== null)[0]?.href }) (feat) ",
|
||||
"_mastodon_link=(feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName(\"a\")).filter(a => a.getAttribute(\"rel\")?.indexOf('me') >= 0)[0]?.href})(feat) ",
|
||||
"_mastodon_candidate=feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a",
|
||||
"__current_background='some value to let the validation run through'"
|
||||
"__current_background='initial_value'"
|
||||
],
|
||||
"tagRenderings": [
|
||||
{
|
||||
|
@ -104,11 +104,25 @@
|
|||
"*": "{logout()}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "background-layer-readonly",
|
||||
"condition": {
|
||||
"and": [
|
||||
"_theme:backgroundLayer~*",
|
||||
"mapcomplete-preferred-background-layer~*",
|
||||
"_theme:backgroundLayer!:={mapcomplete-preferred-background-layer}"
|
||||
]
|
||||
},
|
||||
"render": {
|
||||
"en": "This thematic map has a predefined background layer set. Your default theme setting does not apply"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "background-layer",
|
||||
"question": {
|
||||
"en": "What background layer should be shown by default?"
|
||||
},
|
||||
"condition": "_theme:backgroundLayer=",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "mapcomplete-preferred-background-layer=",
|
||||
|
@ -140,7 +154,11 @@
|
|||
"en": "Use the current background layer (<span class='code'>{__current_background}</span>) as default background"
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"or": ["__current_background=","__current_background=osm"]
|
||||
"or": [
|
||||
"__current_background=",
|
||||
"__current_background=osm",
|
||||
"__current_background=initial_value"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue