Update to template

This commit is contained in:
pietervdvn 2022-03-12 16:24:53 +01:00
parent 918bc9f3a9
commit d356b5704a

View file

@ -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", "#": "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;", "#": "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", "#": "Then, go to https://mapcomplete.osm.be/theme?userlayout=true#your-base64-encoded-file",
"id": "template", "id": "template",
"maintainer": "Write your name here", "maintainer": "Write your name here",
"version": "2022-03-12", "version": "2022-03-12",
@ -20,9 +19,7 @@
"startZoom": 0, "startZoom": 0,
"startLat": 0, "startLat": 0,
"startLon": 0, "startLon": 0,
"#": "For more options and configuration, see the documentation in LayoutConfig.json", "#": "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": "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": [ "layers": [
"bench", "bench",
@ -31,9 +28,16 @@
"source": { "source": {
"osmTags": { "osmTags": {
"#": "For a description on which tags are possible, see https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md", "#": "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~*", "if": "name~*",
"then": { "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}" "*": "{name}"
} }
} }
@ -60,16 +64,18 @@
}, },
"allowMove": true, "allowMove": true,
"deletion": { "deletion": {
"softDeletionTags": { "softDeletionTags": [
"disused:key:={key}" "disused:key:={key}"
} ]
}, },
"#": "The maprenderings describe how a feature is shown on the map", "#": "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", "#": "Rendering block of a mapping which is shown for points AND at the center point of a line/area",
"location": ["point","centroid"], "location": [
"point",
"centroid"
],
"icon": "circle:white;URL or path to icon.svg", "icon": "circle:white;URL or path to icon.svg",
"iconSize": "30,30,center" "iconSize": "30,30,center"
"#": "Note: all these values can be tagrenderings too, e.g.:", "#": "Note: all these values can be tagrenderings too, e.g.:",
@ -86,21 +92,29 @@
} }
] ]
} }
},{ },
"#": "Rendering of a line", {
"#": "Rendering of a line",
"color": "#ff0", "color": "#ff0",
"width": 5 "width": 5
} }
], ],
"#": "Presets describe which new items can be added on click. Delete this block if adding a new point is not relevant", "#": "Presets describe which new items can be added on click. Delete this block if adding a new point is not relevant",
"presets": [ "presets": [
{ {
"title": "lowercase item", "title": {
"tags": ["somekey=somevalue","otherkey=othervalue"], "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", "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)", "#": "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", "opening_hours",
"email", "email",
"reviews", "reviews",
{ {
"render": { "render": {
"en": "This is a simple tagrendering without a question. It will always show this text as is" "en": "This is a simple tagrendering without a question. It will always show this text as is"
@ -124,9 +137,11 @@
}, },
{ {
"render": { "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": { "freeform": {
"key": "some_osm_key", "key": "some_osm_key",
"#": "Types can be found at https://github.com/pietervdvn/MapComplete/blob/develop/Docs/SpecialInputElements.md", "#": "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" "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", "#": "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": [ "mappings": [
{ {
"if": "somekey=some_value", "if": "somekey=some_value",
@ -159,12 +173,13 @@
"#": "An extra icon supporting this option" "#": "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", "#": "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"
]
} }
] ]
} }
] ]
} }
] ]
} }