Update to template
This commit is contained in:
parent
918bc9f3a9
commit
d356b5704a
1 changed files with 43 additions and 28 deletions
|
@ -5,7 +5,6 @@
|
|||
"#": "To actually load your theme: on linux: run a local webserver (e.g. `webfsd`) and go to https://mapcomplete.osm.be/theme?userlayout=http://127.0.0.1:8080/path-to-your-theme.json",
|
||||
"#": "If you don't know how to run a webserver: go to https://www.base64encode.org/ , copy paste this entire document in the 'encode' field and encode it;",
|
||||
"#": "Then, go to https://mapcomplete.osm.be/theme?userlayout=true#your-base64-encoded-file",
|
||||
|
||||
"id": "template",
|
||||
"maintainer": "Write your name here",
|
||||
"version": "2022-03-12",
|
||||
|
@ -20,9 +19,7 @@
|
|||
"startZoom": 0,
|
||||
"startLat": 0,
|
||||
"startLon": 0,
|
||||
|
||||
"#": "For more options and configuration, see the documentation in LayoutConfig.json",
|
||||
|
||||
"#layers": "The list of layers is where most of the content will be. Either reuse an already existing layer by simply calling it's ID or define a whole new layer. An overview of builtin layers is at https://github.com/pietervdvn/MapComplete/blob/develop/Docs/BuiltinLayers.md#normal-layers",
|
||||
"layers": [
|
||||
"bench",
|
||||
|
@ -31,9 +28,16 @@
|
|||
"source": {
|
||||
"osmTags": {
|
||||
"#": "For a description on which tags are possible, see https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md",
|
||||
"and": ["key0=value0","key1=value1",
|
||||
"and": [
|
||||
"key0=value0",
|
||||
"key1=value1",
|
||||
{
|
||||
"or": ["key2!=value3", "key3=", "key4~*", "key5~some.[regex]*"]
|
||||
"or": [
|
||||
"key2!=value3",
|
||||
"key3=",
|
||||
"key4~*",
|
||||
"key5~some.[regex]*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -51,7 +55,7 @@
|
|||
{
|
||||
"if": "name~*",
|
||||
"then": {
|
||||
"#": "If name is given, use name instead as popup title. Note that the translation here uses '*' instead of 'en', which'll be shown in every language" ,
|
||||
"#": "If name is given, use name instead as popup title. Note that the translation here uses '*' instead of 'en', which'll be shown in every language",
|
||||
"*": "{name}"
|
||||
}
|
||||
}
|
||||
|
@ -60,16 +64,18 @@
|
|||
},
|
||||
"allowMove": true,
|
||||
"deletion": {
|
||||
"softDeletionTags": {
|
||||
"softDeletionTags": [
|
||||
"disused:key:={key}"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"#": "The maprenderings describe how a feature is shown on the map",
|
||||
"mapRendering": [
|
||||
"mapRendering": [
|
||||
{
|
||||
"#": "Rendering block of a mappin which is shown for points AND at the center point of a line/area",
|
||||
"location": ["point","centroid"],
|
||||
"#": "Rendering block of a mapping which is shown for points AND at the center point of a line/area",
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"icon": "circle:white;URL or path to icon.svg",
|
||||
"iconSize": "30,30,center"
|
||||
"#": "Note: all these values can be tagrenderings too, e.g.:",
|
||||
|
@ -86,21 +92,29 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
},{
|
||||
"#": "Rendering of a line",
|
||||
},
|
||||
{
|
||||
"#": "Rendering of a line",
|
||||
"color": "#ff0",
|
||||
"width": 5
|
||||
|
||||
}
|
||||
],
|
||||
|
||||
"#": "Presets describe which new items can be added on click. Delete this block if adding a new point is not relevant",
|
||||
"presets": [
|
||||
{
|
||||
"title": "lowercase item",
|
||||
"tags": ["somekey=somevalue","otherkey=othervalue"],
|
||||
"title": {
|
||||
"en": "lowercase item"
|
||||
},
|
||||
"tags": [
|
||||
"somekey=somevalue",
|
||||
"otherkey=othervalue"
|
||||
],
|
||||
"description": "A thorough definition of what the item is, usefull if people add stuff wrongly. This is optional",
|
||||
"exampleImages": ["optionally add images here", "an image.jpg","another example image of the feature.jpg"]
|
||||
"exampleImages": [
|
||||
"optionally add images here",
|
||||
"an image.jpg",
|
||||
"another example image of the feature.jpg"
|
||||
]
|
||||
}
|
||||
],
|
||||
"#": "The tagrenderings are everything that must be shown and/or asked. Use a full tag-rendering section OR a single string to call a builtin tagrendering (see https://github.com/pietervdvn/MapComplete/blob/develop/Docs/BuiltinQuestions.md)",
|
||||
|
@ -116,7 +130,6 @@
|
|||
"opening_hours",
|
||||
"email",
|
||||
"reviews",
|
||||
|
||||
{
|
||||
"render": {
|
||||
"en": "This is a simple tagrendering without a question. It will always show this text as is"
|
||||
|
@ -124,9 +137,11 @@
|
|||
},
|
||||
{
|
||||
"render": {
|
||||
"en": "This is a advanced tagrendering"
|
||||
"en": "The value of some_osm_key is {some_osm_key} in this advanced tagrendering"
|
||||
},
|
||||
"question": {
|
||||
"en": "What is XYZ?"
|
||||
},
|
||||
"question": "What is XYZ?",
|
||||
"freeform": {
|
||||
"key": "some_osm_key",
|
||||
"#": "Types can be found at https://github.com/pietervdvn/MapComplete/blob/develop/Docs/SpecialInputElements.md",
|
||||
|
@ -139,14 +154,13 @@
|
|||
"en": "Text on radio button which also is shown if somekey=some_value is present on the object"
|
||||
},
|
||||
"#": "If this option is picked as answer, these tags will be added additionally. However, if 'somekey=some_value' is present, the above rendering will be shown",
|
||||
"addExtraTags": ["extrakey=extravalue"]
|
||||
"addExtraTags": [
|
||||
"extrakey=extravalue"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"render": {
|
||||
"en": "This is a simple tagrendering without a question. It will always show this text as is"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "somekey=some_value",
|
||||
|
@ -159,12 +173,13 @@
|
|||
"#": "An extra icon supporting this option"
|
||||
},
|
||||
"#": "If this option is picked as answer, these tags will be added additionally. However, if 'somekey=some_value' is present, the above rendering will be shown",
|
||||
"addExtraTags": ["extrakey=extravalue"]
|
||||
"addExtraTags": [
|
||||
"extrakey=extravalue"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
}
|
Loading…
Reference in a new issue