Last active
March 12, 2022 15:17
-
-
Save tordans/56928a3f1d0b608f6930479584622988 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"#": "This JSON file is a small template to get you started developing a theme", | |
"#": "All lines starting with '#' are comments and can be removed in the theme if you don't need the explanation anymore", | |
"#": "Make sure to join our chat channel at https://app.element.io/#/room/#MapComplete:matrix.org for questions, sharing your theme, ...", | |
"#": "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": "crossing", | |
"maintainer": "Crossing", | |
"version": "2022-03-12", | |
"title": { | |
"en": "Crossing Theme", | |
"#": "You can add extra languages here (and in all translation blocks), but make sure 'en' is everywhere" | |
}, | |
"description": { | |
"en": "The welcome message goes here – crossing theme" | |
}, | |
"icon": "/path/to/icon.svg OR path to an online svg, such as https://upload.wikimedia.org/wikipedia/commons/9/9f/Missing_Maps_Icon.svg", | |
"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": [ | |
{ | |
"id": "crossing", | |
"source": { | |
"osmTags": { | |
"#": "For a description on which tags are possible, see https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md", | |
"and": ["crossing~*"] | |
} | |
}, | |
"#": "Minzoom: only download and show if zoom >= minzoom", | |
"minzoom": 12, | |
"name": { | |
"en": "Crossings #123" | |
}, | |
"title": { | |
"render": { | |
"en": "Crossing #124" | |
} | |
}, | |
"allowMove": false, | |
"#": "The maprenderings describe how a feature is shown on the map", | |
"mapRendering": [ | |
{ | |
"#": "Rendering block of a mappin which is shown for points AND at the center point of a line/area", | |
"location": ["point"], | |
"icon": "circle:white", | |
"iconSize": "30,30,center" | |
},{ | |
"#": "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": {"en": "unmarked crossing #125"}, | |
"tags": ["crossing=unmarked"], | |
"preciseInput": { | |
"preferredBackground": [ | |
"photo" | |
], | |
"snapToLayer": "cycleways_and_roads", | |
"maxSnapDistance": 25 | |
} | |
} | |
], | |
"#": "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)", | |
"tagRenderings": [ | |
{ | |
"render": { | |
"en": "This is a simple tagrendering without a question. It will always show this text as is" | |
} | |
}, | |
"images", | |
{ | |
"question": { | |
"en": "Does this crossing have a kerb extension?" | |
}, | |
"mappings": [ | |
{ | |
"if": "crossing:kerb_extension=both", | |
"then": { | |
"en": "kerb extension on both sides" | |
} | |
}, | |
{ | |
"if": "crossing:kerb_extension=no", | |
"then": { | |
"en": "does not have kerb extension" | |
} | |
}, | |
{ | |
"if": "crossing:kerb_extension=left", | |
"then": { | |
"en": "kerb extension on left side" | |
} | |
}, | |
{ | |
"if": "crossing:kerb_extension=right", | |
"then": { | |
"en": "kerb extension on right side" | |
} | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment