Merge develop
This commit is contained in:
commit
008ed859bb
228 changed files with 778708 additions and 38704 deletions
|
@ -10,5 +10,5 @@ ports:
|
|||
vscode:
|
||||
extensions:
|
||||
- "esbenp.prettier-vscode"
|
||||
- "eamodio.gitlens",
|
||||
- "GitHub.vscode-pull-request-github"
|
||||
- "eamodio.gitlens"
|
||||
- "GitHub.vscode-pull-request-github"
|
||||
|
|
|
@ -10,6 +10,7 @@ import Constants from "../Models/Constants";
|
|||
import {Utils} from "../Utils";
|
||||
import Link from "../UI/Base/Link";
|
||||
import {LayoutConfigJson} from "../Models/ThemeConfig/Json/LayoutConfigJson";
|
||||
import {LayerConfigJson} from "../Models/ThemeConfig/Json/LayerConfigJson";
|
||||
|
||||
export class AllKnownLayouts {
|
||||
public static allKnownLayouts: Map<string, LayoutConfig> = AllKnownLayouts.AllLayouts();
|
||||
|
@ -19,7 +20,7 @@ export class AllKnownLayouts {
|
|||
|
||||
public static AllPublicLayers(options?: {
|
||||
includeInlineLayers:true | boolean
|
||||
}) {
|
||||
}) : LayerConfig[] {
|
||||
const allLayers: LayerConfig[] = []
|
||||
const seendIds = new Set<string>()
|
||||
AllKnownLayouts.sharedLayers.forEach((layer, key) => {
|
||||
|
@ -209,9 +210,9 @@ export class AllKnownLayouts {
|
|||
])
|
||||
}
|
||||
|
||||
private static getSharedLayers(): Map<string, LayerConfig> {
|
||||
public static getSharedLayers(): Map<string, LayerConfig> {
|
||||
const sharedLayers = new Map<string, LayerConfig>();
|
||||
for (const layer of known_themes.layers) {
|
||||
for (const layer of known_themes["layers"]) {
|
||||
try {
|
||||
// @ts-ignore
|
||||
const parsed = new LayerConfig(layer, "shared_layers")
|
||||
|
@ -226,6 +227,16 @@ export class AllKnownLayouts {
|
|||
return sharedLayers;
|
||||
}
|
||||
|
||||
public static getSharedLayersConfigs(): Map<string, LayerConfigJson> {
|
||||
const sharedLayers = new Map<string, LayerConfigJson>();
|
||||
for (const layer of known_themes["layers"]) {
|
||||
// @ts-ignore
|
||||
sharedLayers.set(layer.id, layer);
|
||||
}
|
||||
|
||||
return sharedLayers;
|
||||
}
|
||||
|
||||
private static GenerateOrderedList(allKnownLayouts: Map<string, LayoutConfig>): LayoutConfig[] {
|
||||
const list = []
|
||||
allKnownLayouts.forEach((layout) => {
|
||||
|
@ -236,7 +247,7 @@ export class AllKnownLayouts {
|
|||
|
||||
private static AllLayouts(): Map<string, LayoutConfig> {
|
||||
const dict: Map<string, LayoutConfig> = new Map();
|
||||
for (const layoutConfigJson of known_themes.themes) {
|
||||
for (const layoutConfigJson of known_themes["themes"]) {
|
||||
const layout = new LayoutConfig(<LayoutConfigJson>layoutConfigJson, true)
|
||||
dict.set(layout.id, layout)
|
||||
for (let i = 0; i < layout.layers.length; i++) {
|
||||
|
|
|
@ -39,9 +39,11 @@
|
|||
+ [export_as_geojson](#export_as_geojson)
|
||||
+ [minimap](#minimap)
|
||||
+ [wikipedia](#wikipedia)
|
||||
+ [wikidata.school-language](#wikidataschool-language)
|
||||
+ [id_presets.shop_types](#id_presetsshop_types)
|
||||
+ [school.capacity](#schoolcapacity)
|
||||
+ [school.gender](#schoolgender)
|
||||
+ [wikidata.language](#wikidatalanguage)
|
||||
|
||||
|
||||
|
||||
|
@ -101,6 +103,7 @@
|
|||
- play_forest
|
||||
- playground
|
||||
- public_bookcase
|
||||
- rainbow_crossings
|
||||
- recycling
|
||||
- shops
|
||||
- slow_roads
|
||||
|
@ -532,6 +535,17 @@
|
|||
|
||||
|
||||
|
||||
### wikidata.school-language
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- school
|
||||
|
||||
|
||||
|
||||
|
||||
### id_presets.shop_types
|
||||
|
||||
|
||||
|
@ -561,6 +575,17 @@
|
|||
|
||||
|
||||
- tertiary_education
|
||||
|
||||
|
||||
|
||||
|
||||
### wikidata.language
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- wikidata
|
||||
|
||||
|
||||
This document is autogenerated from [assets/layers/*.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/layers/*.json)
|
|
@ -837,6 +837,7 @@ The following layers are included in MapComplete:
|
|||
- [play_forest](./Layers/play_forest.md)
|
||||
- [playground](./Layers/playground.md)
|
||||
- [public_bookcase](./Layers/public_bookcase.md)
|
||||
- [rainbow_crossings](./Layers/rainbow_crossings.md)
|
||||
- [recycling](./Layers/recycling.md)
|
||||
- [school](./Layers/school.md)
|
||||
- [shelter](./Layers/shelter.md)
|
||||
|
|
|
@ -72,6 +72,12 @@ To use the WSL in Visual Studio Code:
|
|||
or `userlayout=true#<layout configuration>` as [Query parameter](URL_Parameters.md). Note that the shorter URLs (
|
||||
e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version.
|
||||
|
||||
### Dependencie
|
||||
|
||||
`make` , `python3` `g++`
|
||||
|
||||
(run `nix-env -iA nixos.gnumake nixos.gdc nixos.python3`)
|
||||
|
||||
Automatic deployment
|
||||
--------------------
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ A layer showing bicycle pumps and bicycle repair tool stands
|
|||
|
||||
|
||||
- [cyclofix](https://mapcomplete.osm.be/cyclofix)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ A shop specifically selling bicycles or related items
|
|||
|
||||
|
||||
- [cyclofix](https://mapcomplete.osm.be/cyclofix)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ A layer showing cafés and pubs where one can gather around a drink. The layer a
|
|||
|
||||
|
||||
- [cafes_and_pubs](https://mapcomplete.osm.be/cafes_and_pubs)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ All infrastructure that someone can cycle over, accompanied with questions about
|
|||
- This layer is needed as dependency for layer [barrier](#barrier)
|
||||
- This layer is needed as dependency for layer [crossings](#crossings)
|
||||
- This layer is needed as dependency for layer [kerbs](#kerbs)
|
||||
- This layer is needed as dependency for layer [rainbow_crossings](#rainbow_crossings)
|
||||
|
||||
|
||||
|
||||
|
@ -30,7 +31,9 @@ All infrastructure that someone can cycle over, accompanied with questions about
|
|||
|
||||
- [cycle_infra](https://mapcomplete.osm.be/cycle_infra)
|
||||
- [kerbs_and_crossings](https://mapcomplete.osm.be/kerbs_and_crossings)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [rainbow_crossings](https://mapcomplete.osm.be/rainbow_crossings)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
<img src='https://mapcomplete.osm.be/circle:white;./assets/layers/doctors/doctors.svg' height="100px">
|
||||
|
||||
This layer shows doctor offices, dentists and other healthcare facilities
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -24,6 +26,7 @@
|
|||
|
||||
|
||||
- [healthcare](https://mapcomplete.osm.be/healthcare)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
@ -62,6 +65,7 @@ attribute | type | values which are supported by this layer
|
|||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/phone#values) [phone](https://wiki.openstreetmap.org/wiki/Key:phone) | [phone](../SpecialInputElements.md#phone) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/email#values) [email](https://wiki.openstreetmap.org/wiki/Key:email) | [email](../SpecialInputElements.md#email) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/website#values) [website](https://wiki.openstreetmap.org/wiki/Key:website) | [url](../SpecialInputElements.md#url) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/name#values) [name](https://wiki.openstreetmap.org/wiki/Key:name) | [string](../SpecialInputElements.md#string) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/healthcare:speciality#values) [healthcare:speciality](https://wiki.openstreetmap.org/wiki/Key:healthcare:speciality) | [string](../SpecialInputElements.md#string) | [general](https://wiki.openstreetmap.org/wiki/Tag:healthcare:speciality%3Dgeneral) [gynaecology](https://wiki.openstreetmap.org/wiki/Tag:healthcare:speciality%3Dgynaecology) [psychiatry](https://wiki.openstreetmap.org/wiki/Tag:healthcare:speciality%3Dpsychiatry) [paediatrics](https://wiki.openstreetmap.org/wiki/Tag:healthcare:speciality%3Dpaediatrics)
|
||||
|
||||
|
||||
|
@ -151,6 +155,20 @@ This is rendered with <a href='{website}' target='_blank'>{website}</a>
|
|||
|
||||
|
||||
|
||||
### name
|
||||
|
||||
|
||||
|
||||
The question is What is the name of this doctors place?
|
||||
|
||||
This rendering asks information about the property [name](https://wiki.openstreetmap.org/wiki/Key:name)
|
||||
|
||||
This is rendered with This doctors place is called {name}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### specialty
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ A layer showing entrances and offering capabilities to survey some advanced data
|
|||
|
||||
|
||||
- [entrances](https://mapcomplete.osm.be/entrances)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ A layer showing restaurants and fast-food amenities (with a special rendering fo
|
|||
|
||||
- [food](https://mapcomplete.osm.be/food)
|
||||
- [fritures](https://mapcomplete.osm.be/fritures)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [pets](https://mapcomplete.osm.be/pets)
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ A layer showing kerbs.
|
|||
|
||||
|
||||
- [kerbs_and_crossings](https://mapcomplete.osm.be/kerbs_and_crossings)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
@ -121,7 +122,7 @@ The question is What is the height of this kerb?
|
|||
|
||||
This rendering asks information about the property [kerb:height](https://wiki.openstreetmap.org/wiki/Key:kerb:height)
|
||||
|
||||
This is rendered with Kerb height: {{kerb:height}}
|
||||
This is rendered with Kerb height: {kerb:height}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
|
||||
- This layer is shown at zoomlevel **0** and higher
|
||||
- This layer is shown at zoomlevel **16** and higher
|
||||
- Not rendered on the map by default. If you want to rendering this on the map, override `mapRenderings`
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ A layer showing car parkings
|
|||
|
||||
|
||||
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [parkings](https://mapcomplete.osm.be/parkings)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [transit](https://mapcomplete.osm.be/transit)
|
||||
|
@ -53,6 +54,19 @@ Elements must have the all of following tags to be shown on this layer:
|
|||
|
||||
|
||||
|
||||
Warning:
|
||||
|
||||
this quick overview is incomplete
|
||||
|
||||
|
||||
|
||||
attribute | type | values which are supported by this layer
|
||||
----------- | ------ | ------------------------------------------
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/parking#values) [parking](https://wiki.openstreetmap.org/wiki/Key:parking) | Multiple choice | [surface](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dsurface) [street_side](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dstreet_side) [underground](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dunderground) [multi-storey](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dmulti-storey) [rooftop](https://wiki.openstreetmap.org/wiki/Tag:parking%3Drooftop) [lane](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dlane) [carports](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dcarports) [garage_boxes](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dgarage_boxes) [layby](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dlayby) [sheds](https://wiki.openstreetmap.org/wiki/Tag:parking%3Dsheds)
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:disabled#values) [capacity:disabled](https://wiki.openstreetmap.org/wiki/Key:capacity:disabled) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity#values) [capacity](https://wiki.openstreetmap.org/wiki/Key:capacity) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
|
||||
|
||||
|
||||
|
||||
### images
|
||||
|
@ -61,6 +75,66 @@ Elements must have the all of following tags to be shown on this layer:
|
|||
|
||||
This tagrendering has no question and is thus read-only
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### parking-type
|
||||
|
||||
|
||||
|
||||
The question is What kind of parking is this?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This is a surface parking lot corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dsurface' target='_blank'>surface</a>
|
||||
- This is a parking bay next to a street corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dstreet_side' target='_blank'>street_side</a>
|
||||
- This is an underground parking garage corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dunderground' target='_blank'>underground</a>
|
||||
- This is a multi-storey parking garage corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dmulti-storey' target='_blank'>multi-storey</a>
|
||||
- This is a rooftop parking deck corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Drooftop' target='_blank'>rooftop</a>
|
||||
- This is a lane for parking on the road corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dlane' target='_blank'>lane</a>
|
||||
- This is parking covered by carports corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dcarports' target='_blank'>carports</a>
|
||||
- This a parking consisting of garage boxes corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dgarage_boxes' target='_blank'>garage_boxes</a>
|
||||
- This is a parking on a layby corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dlayby' target='_blank'>layby</a>
|
||||
- This is a parking consisting of sheds corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:parking' target='_blank'>parking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:parking%3Dsheds' target='_blank'>sheds</a>
|
||||
|
||||
|
||||
|
||||
|
||||
### capacity-disabled
|
||||
|
||||
|
||||
|
||||
The question is How many disabled parking spots are there at this parking?
|
||||
|
||||
This rendering asks information about the property [capacity:disabled](https://wiki.openstreetmap.org/wiki/Key:capacity:disabled)
|
||||
|
||||
This is rendered with There are {capacity:disabled} disabled parking spots
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- There are disabled parking spots, but it is not known how many corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:capacity:disabled' target='_blank'>capacity:disabled</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:capacity:disabled%3Dyes' target='_blank'>yes</a>
|
||||
- This option cannot be chosen as answer
|
||||
- There are no disabled parking spots corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:capacity:disabled' target='_blank'>capacity:disabled</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:capacity:disabled%3Dno' target='_blank'>no</a>
|
||||
- This option cannot be chosen as answer
|
||||
|
||||
|
||||
|
||||
|
||||
### capacity
|
||||
|
||||
|
||||
|
||||
The question is How many parking spots are there at this parking?
|
||||
|
||||
This rendering asks information about the property [capacity](https://wiki.openstreetmap.org/wiki/Key:capacity)
|
||||
|
||||
This is rendered with There are {capacity} parking spots
|
||||
|
||||
|
||||
|
||||
This document is autogenerated from [assets/layers/parking/parking.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/layers/parking/parking.json)
|
|
@ -27,6 +27,7 @@ Pedestrian footpaths, especially used for indoor navigation and snapping entranc
|
|||
|
||||
|
||||
- [entrances](https://mapcomplete.osm.be/entrances)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ The layer showing picnic tables
|
|||
|
||||
- [benches](https://mapcomplete.osm.be/benches)
|
||||
- [nature](https://mapcomplete.osm.be/nature)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
|
106
Docs/Layers/rainbow_crossing_high_zoom.md
Normal file
106
Docs/Layers/rainbow_crossing_high_zoom.md
Normal file
|
@ -0,0 +1,106 @@
|
|||
|
||||
|
||||
rainbow_crossing_high_zoom
|
||||
============================
|
||||
|
||||
|
||||
|
||||
<img src='https://mapcomplete.osm.be/./assets/themes/rainbow_crossings/crossing.svg' height="100px">
|
||||
|
||||
A layer showing pedestrian crossings with rainbow paintings
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This layer is shown at zoomlevel **10** and higher
|
||||
- Not visible in the layer selection by default. If you want to make this layer toggable, override `name`
|
||||
|
||||
|
||||
|
||||
|
||||
#### Themes using this layer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [rainbow_crossings](https://mapcomplete.osm.be/rainbow_crossings)
|
||||
|
||||
|
||||
|
||||
|
||||
Basic tags for this layer
|
||||
---------------------------
|
||||
|
||||
|
||||
|
||||
Elements must have the all of following tags to be shown on this layer:
|
||||
|
||||
|
||||
|
||||
- <a href='https://wiki.openstreetmap.org/wiki/Key:highway' target='_blank'>highway</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:highway%3Dcrossing' target='_blank'>crossing</a>
|
||||
- <a href='https://wiki.openstreetmap.org/wiki/Key:crossing:marking' target='_blank'>crossing:marking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:crossing:marking%3Drainbow' target='_blank'>rainbow</a>
|
||||
|
||||
|
||||
[Execute on overpass](http://overpass-turbo.eu/?Q=%5Bout%3Ajson%5D%5Btimeout%3A90%5D%3B(%20%20%20%20nwr%5B%22crossing%3Amarking%22%3D%22rainbow%22%5D%5B%22highway%22%3D%22crossing%22%5D(%7B%7Bbbox%7D%7D)%3B%0A)%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B)
|
||||
|
||||
|
||||
|
||||
Supported attributes
|
||||
----------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### images
|
||||
|
||||
|
||||
|
||||
This tagrendering has no question and is thus read-only
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### crossing-with-rainbow
|
||||
|
||||
|
||||
|
||||
The question is Does this crossing has rainbow paintings?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This crossing has rainbow paintings corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:crossing:marking' target='_blank'>crossing:marking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:crossing:marking%3Drainbow' target='_blank'>rainbow</a>
|
||||
- No rainbow paintings here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:not:crossing:marking' target='_blank'>not:crossing:marking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:not:crossing:marking%3Drainbow' target='_blank'>rainbow</a>
|
||||
- No rainbow paintings here corresponds with crossing:marking!=rainbow
|
||||
- This option cannot be chosen as answer
|
||||
|
||||
|
||||
Only visible if `highway=crossing` is shown
|
||||
|
||||
|
||||
|
||||
### questions
|
||||
|
||||
|
||||
|
||||
This tagrendering has no question and is thus read-only
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### minimap
|
||||
|
||||
|
||||
|
||||
This tagrendering has no question and is thus read-only
|
||||
|
||||
|
||||
|
||||
This document is autogenerated from [assets/themes/rainbow_crossings/rainbow_crossings.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/themes/rainbow_crossings/rainbow_crossings.json)
|
86
Docs/Layers/rainbow_crossings.md
Normal file
86
Docs/Layers/rainbow_crossings.md
Normal file
|
@ -0,0 +1,86 @@
|
|||
|
||||
|
||||
rainbow_crossings
|
||||
===================
|
||||
|
||||
|
||||
|
||||
<img src='https://mapcomplete.osm.be/./assets/themes/rainbow_crossings/crossing.svg' height="100px">
|
||||
|
||||
A layer showing pedestrian crossings with rainbow paintings
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This layer is shown at zoomlevel **17** and higher
|
||||
- This layer will automatically load [cycleways_and_roads](./cycleways_and_roads.md) into the layout as it depends on it: a preset snaps to this layer (presets[0])
|
||||
|
||||
|
||||
|
||||
|
||||
#### Themes using this layer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [rainbow_crossings](https://mapcomplete.osm.be/rainbow_crossings)
|
||||
|
||||
|
||||
|
||||
|
||||
Basic tags for this layer
|
||||
---------------------------
|
||||
|
||||
|
||||
|
||||
Elements must have the all of following tags to be shown on this layer:
|
||||
|
||||
|
||||
|
||||
- <a href='https://wiki.openstreetmap.org/wiki/Key:highway' target='_blank'>highway</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:highway%3Dcrossing' target='_blank'>crossing</a>
|
||||
|
||||
|
||||
[Execute on overpass](http://overpass-turbo.eu/?Q=%5Bout%3Ajson%5D%5Btimeout%3A90%5D%3B(%20%20%20%20nwr%5B%22highway%22%3D%22crossing%22%5D(%7B%7Bbbox%7D%7D)%3B%0A)%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B)
|
||||
|
||||
|
||||
|
||||
Supported attributes
|
||||
----------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### images
|
||||
|
||||
|
||||
|
||||
This tagrendering has no question and is thus read-only
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### crossing-with-rainbow
|
||||
|
||||
|
||||
|
||||
The question is Does this crossing has rainbow paintings?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This crossing has rainbow paintings corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:crossing:marking' target='_blank'>crossing:marking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:crossing:marking%3Drainbow' target='_blank'>rainbow</a>
|
||||
- No rainbow paintings here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:not:crossing:marking' target='_blank'>not:crossing:marking</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:not:crossing:marking%3Drainbow' target='_blank'>rainbow</a>
|
||||
- No rainbow paintings here corresponds with crossing:marking!=rainbow
|
||||
- This option cannot be chosen as answer
|
||||
|
||||
|
||||
Only visible if `highway=crossing` is shown
|
||||
|
||||
This document is autogenerated from [assets/layers/rainbow_crossings/rainbow_crossings.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/layers/rainbow_crossings/rainbow_crossings.json)
|
|
@ -21,6 +21,18 @@ Schools giving primary and secondary education and post-secondary, non-tertiary
|
|||
|
||||
|
||||
|
||||
#### Themes using this layer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
||||
|
||||
Basic tags for this layer
|
||||
---------------------------
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ A shop
|
|||
|
||||
|
||||
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [pets](https://mapcomplete.osm.be/pets)
|
||||
- [shops](https://mapcomplete.osm.be/shops)
|
||||
|
|
|
@ -14,7 +14,7 @@ A layer showing street lights
|
|||
|
||||
|
||||
|
||||
- This layer is shown at zoomlevel **0** and higher
|
||||
- This layer is shown at zoomlevel **16** and higher
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ A layer showing (public) toilets
|
|||
|
||||
|
||||
- [nature](https://mapcomplete.osm.be/nature)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [toilets](https://mapcomplete.osm.be/toilets)
|
||||
|
||||
|
|
|
@ -19,6 +19,18 @@ A nice viewpoint or nice view. Ideal to add an image if no other category fits
|
|||
|
||||
|
||||
|
||||
#### Themes using this layer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
||||
|
||||
Basic tags for this layer
|
||||
---------------------------
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ Special builtin layer providing all walls and buildings. This layer is useful in
|
|||
|
||||
- [aed](https://mapcomplete.osm.be/aed)
|
||||
- [entrances](https://mapcomplete.osm.be/entrances)
|
||||
- [onwheels](https://mapcomplete.osm.be/onwheels)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [surveillance](https://mapcomplete.osm.be/surveillance)
|
||||
|
||||
|
|
66
Docs/Schemas/AndTagConfigJson.schema.json
Normal file
66
Docs/Schemas/AndTagConfigJson.schema.json
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"additionalProperties": false
|
||||
}
|
63
Docs/Schemas/AndTagConfigJsonJSC.ts
Normal file
63
Docs/Schemas/AndTagConfigJsonJSC.ts
Normal file
|
@ -0,0 +1,63 @@
|
|||
export default {
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -28,9 +28,12 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The tags that will be given to the object.\nThis must remove tags so that the 'source/osmTags' won't match anymore"
|
||||
},
|
||||
"then": {}
|
||||
"then": {
|
||||
"description": "The human explanation for the options"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
|
@ -42,7 +45,12 @@
|
|||
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -55,36 +63,62 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,91 +1,124 @@
|
|||
export default {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"extraDeleteReasons": {
|
||||
"description": "*\nBy default, three reasons to delete a point are shown:\n\n- The point does not exist anymore\n- The point was a testing point\n- THe point could not be found\n\nHowever, for some layers, there might be different or more specific reasons for deletion which can be user friendly to set, e.g.:\n\n- the shop has closed\n- the climbing route has been closed of for nature conservation reasons\n- ...\n\nThese reasons can be stated here and will be shown in the list of options the user can choose from",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"explanation": {
|
||||
"description": "The text that will be shown to the user - translatable"
|
||||
},
|
||||
"changesetMessage": {
|
||||
"description": "The text that will be uploaded into the changeset or will be used in the fixme in case of a soft deletion\nShould be a few words, in english",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"changesetMessage",
|
||||
"explanation"
|
||||
]
|
||||
}
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"extraDeleteReasons": {
|
||||
"description": "*\nBy default, three reasons to delete a point are shown:\n\n- The point does not exist anymore\n- The point was a testing point\n- THe point could not be found\n\nHowever, for some layers, there might be different or more specific reasons for deletion which can be user friendly to set, e.g.:\n\n- the shop has closed\n- the climbing route has been closed of for nature conservation reasons\n- ...\n\nThese reasons can be stated here and will be shown in the list of options the user can choose from",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"explanation": {
|
||||
"description": "The text that will be shown to the user - translatable"
|
||||
},
|
||||
"changesetMessage": {
|
||||
"description": "The text that will be uploaded into the changeset or will be used in the fixme in case of a soft deletion\nShould be a few words, in english",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"nonDeleteMappings": {
|
||||
"description": "In some cases, a (starting) contributor might wish to delete a feature even though deletion is not appropriate.\n(The most relevant case are small paths running over private property. These should be marked as 'private' instead of deleted, as the community might trace the path again from aerial imagery, gettting us back to the original situation).\n\nBy adding a 'nonDeleteMapping', an option can be added into the list which will retag the feature.\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
"then": {}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
},
|
||||
"softDeletionTags": {
|
||||
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"neededChangesets": {
|
||||
"description": "*\nBy default, the contributor needs 20 previous changesets to delete points edited by others.\nFor some small features (e.g. bicycle racks) this is too much and this requirement can be lowered or dropped, which can be done here.",
|
||||
"type": "number"
|
||||
}
|
||||
"required": [
|
||||
"changesetMessage",
|
||||
"explanation"
|
||||
]
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"nonDeleteMappings": {
|
||||
"description": "In some cases, a (starting) contributor might wish to delete a feature even though deletion is not appropriate.\n(The most relevant case are small paths running over private property. These should be marked as 'private' instead of deleted, as the community might trace the path again from aerial imagery, gettting us back to the original situation).\n\nBy adding a 'nonDeleteMapping', an option can be added into the list which will retag the feature.\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The tags that will be given to the object.\nThis must remove tags so that the 'source/osmTags' won't match anymore"
|
||||
},
|
||||
"then": {
|
||||
"description": "The human explanation for the options"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"softDeletionTags": {
|
||||
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"neededChangesets": {
|
||||
"description": "*\nBy default, the contributor needs 20 previous changesets to delete points edited by others.\nFor some small features (e.g. bicycle racks) this is too much and this requirement can be lowered or dropped, which can be done here.",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -28,36 +28,62 @@
|
|||
"href"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,64 +1,89 @@
|
|||
export default {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"text": {},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"newTab": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"requirements": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"enum": [
|
||||
"iframe",
|
||||
"no-iframe",
|
||||
"no-welcome-message",
|
||||
"welcome-message"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": [
|
||||
"href"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"text": {},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"newTab": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"requirements": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"enum": [
|
||||
"iframe",
|
||||
"no-iframe",
|
||||
"no-welcome-message",
|
||||
"welcome-message"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"href"
|
||||
],
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -13,9 +13,15 @@
|
|||
"properties": {
|
||||
"question": {},
|
||||
"osmTags": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -55,36 +61,62 @@
|
|||
"options"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,91 +1,122 @@
|
|||
export default {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "An id/name for this filter, used to set the URL parameters",
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"description": "The options for a filter\nIf there are multiple options these will be a list of radio buttons\nIf there is only one option this will be a checkbox\nFiltering is done based on the given osmTags that are compared to the objects in that layer.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "An id/name for this filter, used to set the URL parameters",
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"description": "The options for a filter\nIf there are multiple options these will be a list of radio buttons\nIf there is only one option this will be a checkbox\nFiltering is done based on the given osmTags that are compared to the objects in that layer.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"question": {},
|
||||
"osmTags": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"question": {},
|
||||
"osmTags": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
}
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags",
|
||||
"type": "string"
|
||||
},
|
||||
"required": [
|
||||
"question"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"options"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"question"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"options"
|
||||
],
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -21,15 +21,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"osmTags": {
|
||||
"description": "Every source must set which tags have to be present in order to load the given layer.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "Every source must set which tags have to be present in order to load the given layer."
|
||||
},
|
||||
"maxCacheAge": {
|
||||
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
|
||||
|
@ -44,6 +37,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"overpassScript": {
|
||||
"description": "If set, this custom overpass-script will be used instead of building one by using the OSM-tags.\nSpecifying OSM-tags is still obligatory and will still hide non-matching items and they will be used for the rest of the pipeline.\n_This should be really rare_.\n\nFor example, when you want to fetch all grass-areas in parks and which are marked as publicly accessible: \n```\n\"source\": {\n \"overpassScript\": \n \"way[\\\"leisure\\\"=\\\"park\\\"];node(w);is_in;area._[\\\"leisure\\\"=\\\"park\\\"];(way(area)[\\\"landuse\\\"=\\\"grass\\\"]; node(w); );\",\n \"osmTags\": \"access=yes\"\n}\n```",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
@ -56,15 +50,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"osmTags": {
|
||||
"description": "Every source must set which tags have to be present in order to load the given layer.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "Every source must set which tags have to be present in order to load the given layer."
|
||||
},
|
||||
"maxCacheAge": {
|
||||
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
|
||||
|
@ -119,8 +106,20 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"isShown": {
|
||||
"description": "This tag rendering should either be 'yes' or 'no'. If 'no' is returned, then the feature will be hidden from view.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"forceLoad": {
|
||||
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled",
|
||||
|
@ -304,9 +303,21 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"builtin": {
|
||||
"type": "string"
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"override": {}
|
||||
"override": {
|
||||
"$ref": "#/definitions/Partial<QuestionableTagRenderingConfigJson>"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
|
@ -314,7 +325,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>"
|
||||
"$ref": "#/definitions/default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:Partial<QuestionableTagRenderingConfigJson>;})[]>"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -367,7 +378,7 @@
|
|||
]
|
||||
},
|
||||
"allowSplit": {
|
||||
"description": "IF set, a 'split this road' button is shown",
|
||||
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well",
|
||||
"type": "boolean"
|
||||
},
|
||||
"units": {
|
||||
|
@ -378,7 +389,7 @@
|
|||
}
|
||||
},
|
||||
"syncSelection": {
|
||||
"description": "If set, synchronizes wether or not this layer is selected.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
||||
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
||||
"enum": [
|
||||
"global",
|
||||
"local",
|
||||
|
@ -394,36 +405,62 @@
|
|||
"source"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
@ -487,10 +524,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -517,15 +559,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
|
@ -565,6 +600,114 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MappingConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"T": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
@ -598,14 +741,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Badge to show\nType: icon",
|
||||
|
@ -648,7 +785,7 @@
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white; display: block\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -756,7 +893,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"default<default|default|default[]|default[]>": {
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nThis can be used for introducing many similar questions automatically,\nwhich also makes translations easier.\n\n(Note that the key does _not_ need to be wrapped in {}. \nHowever, we recommend to use them if the key is used in a translation, as missing keys will be picked up and warned for by the translation scripts)\n\nFor example:\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: [{\n \"key\":\"a|b|c\"\n }]\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n # The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rewrite": {
|
||||
|
@ -864,83 +1001,7 @@
|
|||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
"$ref": "#/definitions/MappingConfigJson"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
|
@ -962,10 +1023,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -975,8 +1041,101 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": {
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"Partial<QuestionableTagRenderingConfigJson>": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"question": {
|
||||
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only"
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values",
|
||||
"type": "string"
|
||||
},
|
||||
"placeholder": {
|
||||
"description": "A (translated) text that is shown (as gray text) within the textfield"
|
||||
},
|
||||
"helperArgs": {
|
||||
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'",
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"inline": {
|
||||
"description": "When set, influences the way a question is asked.\nInstead of showing a full-widht text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"multiAnswer": {
|
||||
"description": "If true, use checkboxes instead of radio buttons when asking the question",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/MappingConfigJson"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:Partial<QuestionableTagRenderingConfigJson>;})[]>": {
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nThis can be used for introducing many similar questions automatically,\nwhich also makes translations easier.\n\n(Note that the key does _not_ need to be wrapped in {}. \nHowever, we recommend to use them if the key is used in a translation, as missing keys will be picked up and warned for by the translation scripts)\n\nFor example:\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: [{\n \"key\":\"a|b|c\"\n }]\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n # The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rewrite": {
|
||||
|
@ -1014,7 +1173,9 @@
|
|||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
"override": {
|
||||
"$ref": "#/definitions/Partial<QuestionableTagRenderingConfigJson>"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
|
@ -1049,9 +1210,15 @@
|
|||
"properties": {
|
||||
"question": {},
|
||||
"osmTags": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -1122,9 +1289,12 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The tags that will be given to the object.\nThis must remove tags so that the 'source/osmTags' won't match anymore"
|
||||
},
|
||||
"then": {}
|
||||
"then": {
|
||||
"description": "The human explanation for the options"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
|
@ -1136,7 +1306,12 @@
|
|||
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -88,36 +88,62 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
@ -181,10 +207,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -211,15 +242,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
|
|
|
@ -1,261 +1,284 @@
|
|||
export default {
|
||||
"description": "The LineRenderingConfig gives all details onto how to render a single line of a feature.\n\nThis can be used if:\n\n- The feature is a line\n- The feature is an area",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"color": {
|
||||
"description": "The color for way-elements and SVG-elements.\nIf the value starts with \"--\", the style of the body element will be queried for the corresponding variable instead",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"description": "The LineRenderingConfig gives all details onto how to render a single line of a feature.\n\nThis can be used if:\n\n- The feature is a line\n- The feature is an area",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"color": {
|
||||
"description": "The color for way-elements and SVG-elements.\nIf the value starts with \"--\", the style of the body element will be queried for the corresponding variable instead",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
"width": {
|
||||
"description": "The stroke-width for way-elements",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"number"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"dashArray": {
|
||||
"description": "A dasharray, e.g. \"5 6\"\nThe dasharray defines 'pixels of line, pixels of gap, pixels of line, pixels of gap',\nDefault value: \"\" (empty string == full line)",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"lineCap": {
|
||||
"description": "The form at the end of a line",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"fill": {
|
||||
"description": "Whether or not to fill polygons",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"no",
|
||||
"yes"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"fillColor": {
|
||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset": {
|
||||
"description": "The number of pixels this line should be moved.\nUse a positive numbe to move to the right, a negative to move to the left (left/right as defined by the drawing direction of the line).\n\nIMPORTANT: MapComplete will already normalize 'key:both:property' and 'key:both' into the corresponding 'key:left' and 'key:right' tagging (same for 'sidewalk=left/right/both' which is rewritten to 'sidewalk:left' and 'sidewalk:right')\nThis simplifies programming. Refer to the CalculatedTags.md-documentation for more details",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"width": {
|
||||
"description": "The stroke-width for way-elements",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"number"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"dashArray": {
|
||||
"description": "A dasharray, e.g. \"5 6\"\nThe dasharray defines 'pixels of line, pixels of gap, pixels of line, pixels of gap',\nDefault value: \"\" (empty string == full line)",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"lineCap": {
|
||||
"description": "The form at the end of a line",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"fill": {
|
||||
"description": "Whether or not to fill polygons",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"no",
|
||||
"yes"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"fillColor": {
|
||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset": {
|
||||
"description": "The number of pixels this line should be moved.\nUse a positive numbe to move to the right, a negative to move to the left (left/right as defined by the drawing direction of the line).\n\nIMPORTANT: MapComplete will already normalize 'key:both:property' and 'key:both' into the corresponding 'key:left' and 'key:right' tagging (same for 'sidewalk=left/right/both' which is rewritten to 'sidewalk:left' and 'sidewalk:right')\nThis simplifies programming. Refer to the CalculatedTags.md-documentation for more details",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
306
Docs/Schemas/MappingConfigJson.schema.json
Normal file
306
Docs/Schemas/MappingConfigJson.schema.json
Normal file
|
@ -0,0 +1,306 @@
|
|||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
],
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"additionalProperties": false
|
||||
}
|
300
Docs/Schemas/MappingConfigJsonJSC.ts
Normal file
300
Docs/Schemas/MappingConfigJsonJSC.ts
Normal file
|
@ -0,0 +1,300 @@
|
|||
export default {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
],
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -11,36 +11,62 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
|
|
@ -1,84 +1,109 @@
|
|||
export default {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enableImproveAccuracy": {
|
||||
"description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enableRelocation": {
|
||||
"description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason",
|
||||
"type": "boolean"
|
||||
}
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enableImproveAccuracy": {
|
||||
"description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason",
|
||||
"type": "boolean"
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"enableRelocation": {
|
||||
"description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
66
Docs/Schemas/OrTagConfigJson.schema.json
Normal file
66
Docs/Schemas/OrTagConfigJson.schema.json
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"additionalProperties": false
|
||||
}
|
63
Docs/Schemas/OrTagConfigJsonJSC.ts
Normal file
63
Docs/Schemas/OrTagConfigJsonJSC.ts
Normal file
|
@ -0,0 +1,63 @@
|
|||
export default {
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -27,14 +27,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Badge to show\nType: icon",
|
||||
|
@ -77,7 +71,7 @@
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white; display: block\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -92,36 +86,62 @@
|
|||
"location"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
@ -185,10 +205,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -215,15 +240,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
|
|
|
@ -1,265 +1,282 @@
|
|||
export default {
|
||||
"description": "The PointRenderingConfig gives all details onto how to render a single point of a feature.\n\nThis can be used if:\n\n- The feature is a point\n- To render something at the centroid of an area, or at the start, end or projected centroid of a way",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"icon": {
|
||||
"description": "The icon for an element.\nNote that this also doubles as the icon for this layer (rendered with the overpass-tags) ánd the icon in the presets.\n\nThe result of the icon is rendered as follows:\nthe resulting string is interpreted as a _list_ of items, separated by \";\". The bottommost layer is the first layer.\nAs a result, on could use a generic pin, then overlay it with a specific icon.\nTo make things even more practical, one can use all SVG's from the folder \"assets/svg\" and _substitute the color_ in it.\nE.g. to draw a red pin, use \"pin:#f00\", to have a green circle with your icon on top, use `circle:#0f0;<path to my icon.svg>`\n\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"iconBadges": {
|
||||
"description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
},
|
||||
"iconSize": {
|
||||
"description": "A string containing \"width,height\" or \"width,height,anchorpoint\" where anchorpoint is any of 'center', 'top', 'bottom', 'left', 'right', 'bottomleft','topright', ...\nDefault is '40,40,center'",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white; display: block\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
"description": "The PointRenderingConfig gives all details onto how to render a single point of a feature.\n\nThis can be used if:\n\n- The feature is a point\n- To render something at the centroid of an area, or at the start, end or projected centroid of a way",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"location"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
"icon": {
|
||||
"description": "The icon for an element.\nNote that this also doubles as the icon for this layer (rendered with the overpass-tags) ánd the icon in the presets.\n\nThe result of the icon is rendered as follows:\nthe resulting string is interpreted as a _list_ of items, separated by \";\". The bottommost layer is the first layer.\nAs a result, on could use a generic pin, then overlay it with a specific icon.\nTo make things even more practical, one can use all SVG's from the folder \"assets/svg\" and _substitute the color_ in it.\nE.g. to draw a red pin, use \"pin:#f00\", to have a green circle with your icon on top, use `circle:#0f0;<path to my icon.svg>`\n\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"iconBadges": {
|
||||
"description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Badge to show\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
},
|
||||
"iconSize": {
|
||||
"description": "A string containing \"width,height\" or \"width,height,anchorpoint\" where anchorpoint is any of 'center', 'top', 'bottom', 'left', 'right', 'bottomleft','topright', ...\nDefault is '40,40,center'",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"location"
|
||||
],
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -52,83 +52,7 @@
|
|||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
"$ref": "#/definitions/MappingConfigJson"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
|
@ -150,10 +74,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -162,36 +91,62 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
@ -255,10 +210,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -285,15 +245,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
|
@ -332,6 +285,114 @@
|
|||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MappingConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
|
|
|
@ -1,335 +1,393 @@
|
|||
export default {
|
||||
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"question": {
|
||||
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only"
|
||||
"description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"question": {
|
||||
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only"
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values",
|
||||
"type": "string"
|
||||
},
|
||||
"placeholder": {
|
||||
"description": "A (translated) text that is shown (as gray text) within the textfield"
|
||||
},
|
||||
"helperArgs": {
|
||||
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'",
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"inline": {
|
||||
"description": "When set, influences the way a question is asked.\nInstead of showing a full-widht text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
"type": {
|
||||
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values",
|
||||
"type": "string"
|
||||
},
|
||||
"multiAnswer": {
|
||||
"description": "If true, use checkboxes instead of radio buttons when asking the question",
|
||||
"type": "boolean"
|
||||
"placeholder": {
|
||||
"description": "A (translated) text that is shown (as gray text) within the textfield"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
"helperArgs": {
|
||||
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'",
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"addExtraTags": {
|
||||
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"inline": {
|
||||
"description": "When set, influences the way a question is asked.\nInstead of showing a full-widht text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"multiAnswer": {
|
||||
"description": "If true, use checkboxes instead of radio buttons when asking the question",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/MappingConfigJson"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
},
|
||||
"MappingConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nThis can be used for introducing many similar questions automatically,\nwhich also makes translations easier.\n\n(Note that the key does _not_ need to be wrapped in {}. \nHowever, we recommend to use them if the key is used in a translation, as missing keys will be picked up and warned for by the translation scripts)\n\nFor example:\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: [{\n \"key\":\"a|b|c\"\n }]\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n # The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rewrite": {
|
||||
|
@ -33,36 +33,62 @@
|
|||
"rewrite"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
@ -126,10 +152,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -156,15 +187,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
|
@ -204,6 +228,114 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MappingConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"T": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
|
|
@ -1,209 +1,338 @@
|
|||
export default {
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rewrite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sourceString": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"into": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"into",
|
||||
"sourceString"
|
||||
]
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nThis can be used for introducing many similar questions automatically,\nwhich also makes translations easier.\n\n(Note that the key does _not_ need to be wrapped in {}. \nHowever, we recommend to use them if the key is used in a translation, as missing keys will be picked up and warned for by the translation scripts)\n\nFor example:\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: [{\n \"key\":\"a|b|c\"\n }]\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n # The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rewrite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sourceString": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"renderings": {
|
||||
"$ref": "#/definitions/T"
|
||||
"into": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"into",
|
||||
"sourceString"
|
||||
]
|
||||
},
|
||||
"required": [
|
||||
"renderings",
|
||||
"rewrite"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"renderings": {
|
||||
"$ref": "#/definitions/T"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"renderings",
|
||||
"rewrite"
|
||||
],
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TagRenderingConfigJson": {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"T": {
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"Record<string,string[]>": {
|
||||
"type": "object"
|
||||
},
|
||||
"MappingConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
},
|
||||
"T": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
50
Docs/Schemas/TagConfigJson.schema.json
Normal file
50
Docs/Schemas/TagConfigJson.schema.json
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"additionalProperties": false
|
||||
}
|
48
Docs/Schemas/TagConfigJsonJSC.ts
Normal file
48
Docs/Schemas/TagConfigJsonJSC.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
export default {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -21,10 +21,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -51,15 +56,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
|
@ -98,36 +96,62 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,134 +1,157 @@
|
|||
export default {
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
"description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -36,36 +36,62 @@
|
|||
"source"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
@ -129,10 +155,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -159,15 +190,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}"
|
||||
},
|
||||
"then": {
|
||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
||||
|
@ -207,6 +231,114 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Record<string,string[]>": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MappingConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"searchTerms": {
|
||||
"description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\n\nSearchterms (per language) allow to easily find an option if there are many options",
|
||||
"$ref": "#/definitions/Record<string,string[]>"
|
||||
},
|
||||
"priorityIf": {
|
||||
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"T": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
|
@ -240,14 +372,8 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||
},
|
||||
"then": {
|
||||
"description": "Badge to show\nType: icon",
|
||||
|
@ -290,7 +416,7 @@
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white; display: block\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -398,7 +524,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"default<default|default|default[]|default[]>": {
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nThis can be used for introducing many similar questions automatically,\nwhich also makes translations easier.\n\n(Note that the key does _not_ need to be wrapped in {}. \nHowever, we recommend to use them if the key is used in a translation, as missing keys will be picked up and warned for by the translation scripts)\n\nFor example:\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: [{\n \"key\":\"a|b|c\"\n }]\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n # The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rewrite": {
|
||||
|
@ -506,83 +632,7 @@
|
|||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
||||
},
|
||||
"icon": {
|
||||
"description": "An extra icon supporting the choice\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "The path to the icon\nType: icon",
|
||||
"type": "string"
|
||||
},
|
||||
"class": {
|
||||
"description": "Size of the image",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"class",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hideInAnswer": {
|
||||
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n \n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ifnot": {
|
||||
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
"then"
|
||||
]
|
||||
"$ref": "#/definitions/MappingConfigJson"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
|
@ -604,10 +654,15 @@
|
|||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or question) if the object also matches the following tags.\n\nThis is useful to ask a follow-up question. E.g. if there is a diaper table, then ask a follow-up question on diaper tables...",
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -617,8 +672,101 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": {
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"Partial<QuestionableTagRenderingConfigJson>": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"question": {
|
||||
"description": "If it turns out that this tagRendering doesn't match _any_ value, then we show this question.\nIf undefined, the question is never asked and this tagrendering is read-only"
|
||||
},
|
||||
"freeform": {
|
||||
"description": "Allow freeform text input from the user",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values",
|
||||
"type": "string"
|
||||
},
|
||||
"placeholder": {
|
||||
"description": "A (translated) text that is shown (as gray text) within the textfield"
|
||||
},
|
||||
"helperArgs": {
|
||||
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'",
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"addExtraTags": {
|
||||
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"inline": {
|
||||
"description": "When set, influences the way a question is asked.\nInstead of showing a full-widht text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
]
|
||||
},
|
||||
"multiAnswer": {
|
||||
"description": "If true, use checkboxes instead of radio buttons when asking the question",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mappings": {
|
||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/MappingConfigJson"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "If 'group' is defined on many tagRenderings, these are grouped together when shown. The questions are grouped together as well.\nThe first tagRendering of a group will always be a sticky element.",
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"render": {
|
||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
||||
},
|
||||
"condition": {
|
||||
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:Partial<QuestionableTagRenderingConfigJson>;})[]>": {
|
||||
"description": "Rewrites and multiplies the given renderings of type T.\n\nThis can be used for introducing many similar questions automatically,\nwhich also makes translations easier.\n\n(Note that the key does _not_ need to be wrapped in {}. \nHowever, we recommend to use them if the key is used in a translation, as missing keys will be picked up and warned for by the translation scripts)\n\nFor example:\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: [{\n \"key\":\"a|b|c\"\n }]\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n # The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rewrite": {
|
||||
|
@ -656,7 +804,9 @@
|
|||
"builtin": {
|
||||
"type": "string"
|
||||
},
|
||||
"override": {}
|
||||
"override": {
|
||||
"$ref": "#/definitions/Partial<QuestionableTagRenderingConfigJson>"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"builtin",
|
||||
|
@ -691,9 +841,15 @@
|
|||
"properties": {
|
||||
"question": {},
|
||||
"osmTags": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -764,9 +920,12 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"if": {
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/TagConfigJson",
|
||||
"description": "The tags that will be given to the object.\nThis must remove tags so that the 'source/osmTags' won't match anymore"
|
||||
},
|
||||
"then": {}
|
||||
"then": {
|
||||
"description": "The human explanation for the options"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"if",
|
||||
|
@ -778,7 +937,12 @@
|
|||
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
"$ref": "#/definitions/AndTagConfigJson",
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/OrTagConfigJson",
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,36 +25,62 @@
|
|||
"appliesToKey"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
|
|
|
@ -1,98 +1,123 @@
|
|||
export default {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"appliesToKey": {
|
||||
"description": "Every key from this list will be normalized",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"eraseInvalidValues": {
|
||||
"description": "If set, invalid values will be erased in the MC application (but not in OSM of course!)\nBe careful with setting this",
|
||||
"type": "boolean"
|
||||
},
|
||||
"applicableUnits": {
|
||||
"description": "The possible denominations",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ApplicableUnitJson"
|
||||
}
|
||||
}
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"appliesToKey": {
|
||||
"description": "Every key from this list will be normalized",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"applicableUnits",
|
||||
"appliesToKey"
|
||||
],
|
||||
"definitions": {
|
||||
"AndOrTagConfigJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndOrTagConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
}
|
||||
"eraseInvalidValues": {
|
||||
"description": "If set, invalid values will be erased in the MC application (but not in OSM of course!)\nBe careful with setting this",
|
||||
"type": "boolean"
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
"applicableUnits": {
|
||||
"description": "The possible denominations",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ApplicableUnitJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"applicableUnits",
|
||||
"appliesToKey"
|
||||
],
|
||||
"definitions": {
|
||||
"TagConfigJson": {
|
||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AndTagConfigJson"
|
||||
},
|
||||
{
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AndTagConfigJson": {
|
||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"and": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
"OrTagConfigJson": {
|
||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"or": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TagConfigJson"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
"ApplicableUnitJson": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"canonicalDenomination": {
|
||||
"description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used",
|
||||
"type": "string"
|
||||
},
|
||||
"canonicalDenominationSingular": {
|
||||
"description": "The canonical denomination in the case that the unit is precisely '1'",
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeDenomination": {
|
||||
"description": "A list of alternative values which can occur in the OSM database - used for parsing.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"human": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}"
|
||||
},
|
||||
"humanSingular": {
|
||||
"description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"x²\n}"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field",
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {
|
||||
"description": "The default interpretation - only one can be set.\nIf none is set, the first unit will be considered the default interpretation of a value without a unit",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canonicalDenomination"
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
|
@ -69,6 +69,10 @@
|
|||
"key": "contact:website",
|
||||
"description": "Layer 'doctors' shows contact:website~^..*$ with a fixed text, namely '<a href='{contact:website}' target='_blank'>{contact:website}</a>' (in the MapComplete.osm.be theme 'Healthcare')"
|
||||
},
|
||||
{
|
||||
"key": "name",
|
||||
"description": "Layer 'doctors' shows and asks freeform values for key 'name' (in the MapComplete.osm.be theme 'Healthcare')"
|
||||
},
|
||||
{
|
||||
"key": "healthcare:speciality",
|
||||
"description": "Layer 'doctors' shows and asks freeform values for key 'healthcare:speciality' (in the MapComplete.osm.be theme 'Healthcare')"
|
||||
|
|
3347
Docs/TagInfo/mapcomplete_onwheels.json
Normal file
3347
Docs/TagInfo/mapcomplete_onwheels.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -30,6 +30,74 @@
|
|||
{
|
||||
"key": "wikipedia",
|
||||
"description": "The layer 'Parking allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=surface with a fixed text, namely 'This is a surface parking lot' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "surface"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=street_side with a fixed text, namely 'This is a parking bay next to a street' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "street_side"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=underground with a fixed text, namely 'This is an underground parking garage' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "underground"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=multi-storey with a fixed text, namely 'This is a multi-storey parking garage' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "multi-storey"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=rooftop with a fixed text, namely 'This is a rooftop parking deck' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "rooftop"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=lane with a fixed text, namely 'This is a lane for parking on the road' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "lane"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=carports with a fixed text, namely 'This is parking covered by carports' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "carports"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=garage_boxes with a fixed text, namely 'This a parking consisting of garage boxes' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "garage_boxes"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=layby with a fixed text, namely 'This is a parking on a layby' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "layby"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=sheds with a fixed text, namely 'This is a parking consisting of sheds' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "sheds"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows and asks freeform values for key 'capacity:disabled' (in the MapComplete.osm.be theme 'Parking')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows capacity:disabled=yes with a fixed text, namely 'There are disabled parking spots, but it is not known how many' (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows capacity:disabled=no with a fixed text, namely 'There are no disabled parking spots' (in the MapComplete.osm.be theme 'Parking')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "capacity",
|
||||
"description": "Layer 'Parking' shows and asks freeform values for key 'capacity' (in the MapComplete.osm.be theme 'Parking')"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -4628,6 +4628,10 @@
|
|||
"key": "contact:website",
|
||||
"description": "Layer 'doctors' shows contact:website~^..*$ with a fixed text, namely '<a href='{contact:website}' target='_blank'>{contact:website}</a>' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "name",
|
||||
"description": "Layer 'doctors' shows and asks freeform values for key 'name' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "healthcare:speciality",
|
||||
"description": "Layer 'doctors' shows and asks freeform values for key 'healthcare:speciality' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
|
@ -6292,6 +6296,74 @@
|
|||
"key": "wikipedia",
|
||||
"description": "The layer 'Parking allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=surface with a fixed text, namely 'This is a surface parking lot' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "surface"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=street_side with a fixed text, namely 'This is a parking bay next to a street' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "street_side"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=underground with a fixed text, namely 'This is an underground parking garage' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "underground"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=multi-storey with a fixed text, namely 'This is a multi-storey parking garage' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "multi-storey"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=rooftop with a fixed text, namely 'This is a rooftop parking deck' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "rooftop"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=lane with a fixed text, namely 'This is a lane for parking on the road' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "lane"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=carports with a fixed text, namely 'This is parking covered by carports' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "carports"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=garage_boxes with a fixed text, namely 'This a parking consisting of garage boxes' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "garage_boxes"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=layby with a fixed text, namely 'This is a parking on a layby' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "layby"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=sheds with a fixed text, namely 'This is a parking consisting of sheds' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "sheds"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows and asks freeform values for key 'capacity:disabled' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows capacity:disabled=yes with a fixed text, namely 'There are disabled parking spots, but it is not known how many' (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows capacity:disabled=no with a fixed text, namely 'There are no disabled parking spots' (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "capacity",
|
||||
"description": "Layer 'Parking' shows and asks freeform values for key 'capacity' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "amenity",
|
||||
"description": "The MapComplete theme Personal theme has a layer pharmacy showing features with this tag",
|
||||
|
@ -6691,6 +6763,37 @@
|
|||
"key": "website",
|
||||
"description": "Layer 'Bookcases' shows and asks freeform values for key 'website' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "highway",
|
||||
"description": "The MapComplete theme Personal theme has a layer Crossings with rainbow paintings showing features with this tag",
|
||||
"value": "crossing"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "mapillary",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "wikidata",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "wikipedia",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "crossing:marking",
|
||||
"description": "Layer 'Crossings with rainbow paintings' shows crossing:marking=rainbow with a fixed text, namely 'This crossing has rainbow paintings' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "rainbow"
|
||||
},
|
||||
{
|
||||
"key": "not:crossing:marking",
|
||||
"description": "Layer 'Crossings with rainbow paintings' shows not:crossing:marking=rainbow with a fixed text, namely 'No rainbow paintings here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "rainbow"
|
||||
},
|
||||
{
|
||||
"key": "amenity",
|
||||
"description": "The MapComplete theme Personal theme has a layer Recycling showing features with this tag",
|
||||
|
@ -6893,6 +6996,176 @@
|
|||
"description": "Layer 'Recycling' shows opening_hours=24/7 with a fixed text, namely '24/7' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "24/7"
|
||||
},
|
||||
{
|
||||
"key": "amenity",
|
||||
"description": "The MapComplete theme Personal theme has a layer Primary and secondary schools showing features with this tag",
|
||||
"value": "school"
|
||||
},
|
||||
{
|
||||
"key": "name",
|
||||
"description": "Layer 'Primary and secondary schools' shows and asks freeform values for key 'name' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "capacity",
|
||||
"description": "Layer 'Primary and secondary schools' shows and asks freeform values for key 'capacity' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "school",
|
||||
"description": "Layer 'Primary and secondary schools' shows school=kindergarten with a fixed text, namely 'This is a school with a kindergarten section where young kids receive some education which prepares reading and writing.' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "kindergarten"
|
||||
},
|
||||
{
|
||||
"key": "school",
|
||||
"description": "Layer 'Primary and secondary schools' shows school=primary with a fixed text, namely 'This is a school where one learns primary skills such as basic literacy and numerical skills. <div class='subtle'>Pupils typically enroll from 6 years old till 12 years old</div>' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "primary"
|
||||
},
|
||||
{
|
||||
"key": "school",
|
||||
"description": "Layer 'Primary and secondary schools' shows school=secondary with a fixed text, namely 'This is a secondary school which offers all grades' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "secondary"
|
||||
},
|
||||
{
|
||||
"key": "school",
|
||||
"description": "Layer 'Primary and secondary schools' shows school=lower_secondary with a fixed text, namely 'This is a secondary school which does <i>not</i> have all grades, but offers <b>first and second</b> grade' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "lower_secondary"
|
||||
},
|
||||
{
|
||||
"key": "school",
|
||||
"description": "Layer 'Primary and secondary schools' shows school=middle_secondary with a fixed text, namely 'This is a secondary school which does <i>not</i> have all grades, but offers <b>third and fourth</b> grade' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "middle_secondary"
|
||||
},
|
||||
{
|
||||
"key": "school",
|
||||
"description": "Layer 'Primary and secondary schools' shows school=upper_secondary with a fixed text, namely 'This is a secondary school which does <i>not</i> have all grades, but offers <b>fifth and sixth</b> grade' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "upper_secondary"
|
||||
},
|
||||
{
|
||||
"key": "school",
|
||||
"description": "Layer 'Primary and secondary schools' shows school=post_secondary with a fixed text, namely 'This school offers post-secondary education (e.g. a seventh or eight specialisation year)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "post_secondary"
|
||||
},
|
||||
{
|
||||
"key": "school:gender",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:gender=mixed with a fixed text, namely 'Both boys and girls can enroll here and have classes together' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "mixed"
|
||||
},
|
||||
{
|
||||
"key": "school:gender",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:gender=separated with a fixed text, namely 'Both boys and girls can enroll here but they are separated (e.g. they have lessons in different classrooms or at different times)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "separated"
|
||||
},
|
||||
{
|
||||
"key": "school:gender",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:gender=male with a fixed text, namely 'This is a boys only-school' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "male"
|
||||
},
|
||||
{
|
||||
"key": "school:gender",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:gender=female with a fixed text, namely 'This is a girls-only school' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "female"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows and asks freeform values for key 'school:for' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows with a fixed text, namely 'This is a school where students study skills at their age-adequate level. <div>There are little or no special facilities to cater for students with special needs or facilities are ad-hoc</div>' (in the MapComplete.osm.be theme 'Personal theme') Picking this answer will delete the key school:for.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=mainstream with a fixed text, namely 'This is a school for students without special needs<div class='subtle'>This includes students who can follow the courses with small, ad hoc measurements</div>' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "mainstream"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=adults with a fixed text, namely 'This is a school where adults are taught skills on the level as specified.' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "adults"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=autism with a fixed text, namely 'This is a school for students with autism' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "autism"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=learning_disabilities with a fixed text, namely 'This is a school for students with learning disabilities' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "learning_disabilities"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=blind with a fixed text, namely 'This is a school for blind students or students with sight impairments' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "blind"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=deaf with a fixed text, namely 'This is a school for deaf students or students with hearing impairments' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "deaf"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=disabilities with a fixed text, namely 'This is a school for students with disabilities' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "disabilities"
|
||||
},
|
||||
{
|
||||
"key": "school:for",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:for=special_needs with a fixed text, namely 'This is a school for students with special needs' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "special_needs"
|
||||
},
|
||||
{
|
||||
"key": "website",
|
||||
"description": "Layer 'Primary and secondary schools' shows and asks freeform values for key 'website' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "contact:website",
|
||||
"description": "Layer 'Primary and secondary schools' shows contact:website~^..*$ with a fixed text, namely '<a href='{contact:website}' target='_blank'>{contact:website}</a>' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "phone",
|
||||
"description": "Layer 'Primary and secondary schools' shows and asks freeform values for key 'phone' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "contact:phone",
|
||||
"description": "Layer 'Primary and secondary schools' shows contact:phone~^..*$ with a fixed text, namely '<a href='tel:{contact:phone}'>{contact:phone}</a>' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "email",
|
||||
"description": "Layer 'Primary and secondary schools' shows and asks freeform values for key 'email' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "contact:email",
|
||||
"description": "Layer 'Primary and secondary schools' shows contact:email~^..*$ with a fixed text, namely '<a href='mailto:{contact:email}' target='_blank'>{contact:email}</a>' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "school:language",
|
||||
"description": "Layer 'Primary and secondary schools' shows and asks freeform values for key 'school:language' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "school:language",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:language=english with a fixed text, namely 'The main language of this school is unknown' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "english"
|
||||
},
|
||||
{
|
||||
"key": "school:language",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:language=french with a fixed text, namely 'French is the main language of {name}' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "french"
|
||||
},
|
||||
{
|
||||
"key": "school:language",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:language=dutch with a fixed text, namely 'Dutch is the main language of {name}' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "dutch"
|
||||
},
|
||||
{
|
||||
"key": "school:language",
|
||||
"description": "Layer 'Primary and secondary schools' shows school:language=german with a fixed text, namely 'German is the main language of {name}' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
|
||||
"value": "german"
|
||||
},
|
||||
{
|
||||
"key": "school:language",
|
||||
"description": "Layer 'Primary and secondary schools' shows with a fixed text, namely 'The main language of this school is unknown' (in the MapComplete.osm.be theme 'Personal theme') Picking this answer will delete the key school:language.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "amenity",
|
||||
"description": "The MapComplete theme Personal theme has a layer Shelter showing features with this tag",
|
||||
|
@ -8903,6 +9176,31 @@
|
|||
"key": "name",
|
||||
"description": "Layer 'veterinary' shows and asks freeform values for key 'name' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "tourism",
|
||||
"description": "The MapComplete theme Personal theme has a layer Viewpoint showing features with this tag",
|
||||
"value": "viewpoint"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"description": "The layer 'Viewpoint allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "mapillary",
|
||||
"description": "The layer 'Viewpoint allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "wikidata",
|
||||
"description": "The layer 'Viewpoint allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "wikipedia",
|
||||
"description": "The layer 'Viewpoint allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"description": "Layer 'Viewpoint' shows and asks freeform values for key 'description' (in the MapComplete.osm.be theme 'Personal theme')"
|
||||
},
|
||||
{
|
||||
"key": "amenity",
|
||||
"description": "The MapComplete theme Personal theme has a layer Waste Basket showing features with this tag",
|
||||
|
|
45
Docs/TagInfo/mapcomplete_rainbow_crossings.json
Normal file
45
Docs/TagInfo/mapcomplete_rainbow_crossings.json
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"data_format": 1,
|
||||
"project": {
|
||||
"name": "MapComplete Rainbow pedestrian crossings",
|
||||
"description": "On this map, rainbow-painted pedestrian crossings are shown and can be easily added",
|
||||
"project_url": "https://mapcomplete.osm.be/rainbow_crossings",
|
||||
"doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/",
|
||||
"icon_url": "https://mapcomplete.osm.be/assets/themes/rainbow_crossings/logo.svg",
|
||||
"contact_name": "Pieter Vander Vennet, ",
|
||||
"contact_email": "pietervdvn@posteo.net"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"key": "highway",
|
||||
"description": "The MapComplete theme Rainbow pedestrian crossings has a layer Crossings with rainbow paintings showing features with this tag",
|
||||
"value": "crossing"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "mapillary",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "wikidata",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "wikipedia",
|
||||
"description": "The layer 'Crossings with rainbow paintings allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "crossing:marking",
|
||||
"description": "Layer 'Crossings with rainbow paintings' shows crossing:marking=rainbow with a fixed text, namely 'This crossing has rainbow paintings' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Rainbow pedestrian crossings')",
|
||||
"value": "rainbow"
|
||||
},
|
||||
{
|
||||
"key": "not:crossing:marking",
|
||||
"description": "Layer 'Crossings with rainbow paintings' shows not:crossing:marking=rainbow with a fixed text, namely 'No rainbow paintings here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Rainbow pedestrian crossings')",
|
||||
"value": "rainbow"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -356,6 +356,74 @@
|
|||
"key": "wikipedia",
|
||||
"description": "The layer 'Parking allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=surface with a fixed text, namely 'This is a surface parking lot' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "surface"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=street_side with a fixed text, namely 'This is a parking bay next to a street' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "street_side"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=underground with a fixed text, namely 'This is an underground parking garage' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "underground"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=multi-storey with a fixed text, namely 'This is a multi-storey parking garage' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "multi-storey"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=rooftop with a fixed text, namely 'This is a rooftop parking deck' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "rooftop"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=lane with a fixed text, namely 'This is a lane for parking on the road' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "lane"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=carports with a fixed text, namely 'This is parking covered by carports' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "carports"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=garage_boxes with a fixed text, namely 'This a parking consisting of garage boxes' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "garage_boxes"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=layby with a fixed text, namely 'This is a parking on a layby' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "layby"
|
||||
},
|
||||
{
|
||||
"key": "parking",
|
||||
"description": "Layer 'Parking' shows parking=sheds with a fixed text, namely 'This is a parking consisting of sheds' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "sheds"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows and asks freeform values for key 'capacity:disabled' (in the MapComplete.osm.be theme 'Bus routes')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows capacity:disabled=yes with a fixed text, namely 'There are disabled parking spots, but it is not known how many' (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "capacity:disabled",
|
||||
"description": "Layer 'Parking' shows capacity:disabled=no with a fixed text, namely 'There are no disabled parking spots' (in the MapComplete.osm.be theme 'Bus routes')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "capacity",
|
||||
"description": "Layer 'Parking' shows and asks freeform values for key 'capacity' (in the MapComplete.osm.be theme 'Bus routes')"
|
||||
},
|
||||
{
|
||||
"key": "amenity",
|
||||
"description": "The MapComplete theme Bus routes has a layer Shelter showing features with this tag",
|
||||
|
|
|
@ -21,8 +21,9 @@ class StatsDownloader {
|
|||
|
||||
public async DownloadStats() {
|
||||
|
||||
const currentYear = new Date().getFullYear()
|
||||
const currentMonth = new Date().getMonth() + 1
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear()
|
||||
const currentMonth = today.getMonth() + 1
|
||||
for (let year = this.startYear; year <= currentYear; year++) {
|
||||
for (let month = 1; month <= 12; month++) {
|
||||
|
||||
|
@ -31,33 +32,36 @@ class StatsDownloader {
|
|||
}
|
||||
|
||||
if (year === currentYear && month > currentMonth) {
|
||||
continue
|
||||
break
|
||||
}
|
||||
|
||||
const path = `${this._targetDirectory}/stats.${year}-${month}.json`
|
||||
if (existsSync(path)) {
|
||||
if ((month == currentMonth && year == currentYear)) {
|
||||
console.log(`Force downloading ${year}-${month}`)
|
||||
} else {
|
||||
console.log(`Skipping ${year}-${month}: already exists`)
|
||||
continue;
|
||||
}
|
||||
const pathM = `${this._targetDirectory}/stats.${year}-${month}.json`
|
||||
if (existsSync(pathM)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (let day = 1; day <= 31; day++) {
|
||||
if (year === currentYear && month === currentMonth && day === today.getDate() ) {
|
||||
break;
|
||||
}
|
||||
const path = `${this._targetDirectory}/stats.${year}-${month}-${(day < 10 ? "0" : "") + day}.json`
|
||||
if(existsSync(path)){
|
||||
continue
|
||||
}
|
||||
await this.DownloadStatsForDay(year, month, day, path)
|
||||
}
|
||||
await this.DownloadStatsForMonth(year, month, path)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async DownloadStatsForMonth(year: number, month: number, path: string) {
|
||||
public async DownloadStatsForDay(year: number, month: number, day: number, path: string) {
|
||||
|
||||
let page = 1;
|
||||
let allFeatures = []
|
||||
let endDate = `${year}-${Utils.TwoDigits(month + 1)}-01`
|
||||
if (month == 12) {
|
||||
endDate = `${year + 1}-01-01`
|
||||
}
|
||||
let url = this.urlTemplate.replace("{start_date}", year + "-" + Utils.TwoDigits(month) + "-01")
|
||||
let endDay = new Date(year,month - 1 /* Zero-indexed: 0 = january*/,day + 1);
|
||||
let endDate = `${endDay.getFullYear()}-${Utils.TwoDigits(endDay.getMonth()+1)}-${Utils.TwoDigits(endDay.getDate())}`
|
||||
let url = this.urlTemplate.replace("{start_date}", year + "-" + Utils.TwoDigits(month) + "-" + Utils.TwoDigits(day))
|
||||
.replace("{end_date}", endDate)
|
||||
.replace("{page}", "" + page)
|
||||
|
||||
|
@ -77,7 +81,7 @@ class StatsDownloader {
|
|||
|
||||
|
||||
while (url) {
|
||||
ScriptUtils.erasableLog(`Downloading stats for ${year}-${month}, page ${page} ${url}`)
|
||||
ScriptUtils.erasableLog(`Downloading stats for ${year}-${month}-${day}, page ${page} ${url}`)
|
||||
const result = await Utils.downloadJson(url, headers)
|
||||
page++;
|
||||
allFeatures.push(...result.features)
|
||||
|
@ -182,8 +186,8 @@ class ChangesetDataTools {
|
|||
} catch (e) {
|
||||
|
||||
}
|
||||
if(cs.properties.metadata["answer"] > 100){
|
||||
console.log("Lots of answers for https://osm.org/changeset/"+cs.id)
|
||||
if (cs.properties.metadata["answer"] > 100) {
|
||||
console.log("Lots of answers for https://osm.org/changeset/" + cs.id)
|
||||
}
|
||||
return cs
|
||||
}
|
||||
|
@ -212,7 +216,7 @@ function createGraph(
|
|||
title: string,
|
||||
...options: PlotSpec[]): Promise<void> {
|
||||
console.log("Creating graph", title, "...")
|
||||
const process = exec("python3 GenPlot.py \"graphs/" + title + "\"", ((error, stdout, stderr) => {
|
||||
const process = exec("python3 Docs/Tools/GenPlot.py \"graphs/" + title + "\"", ((error, stdout, stderr) => {
|
||||
console.log("Python: ", stdout)
|
||||
if (error !== null) {
|
||||
console.error(error)
|
||||
|
@ -804,13 +808,14 @@ async function main(): Promise<void> {
|
|||
mkdirSync("graphs")
|
||||
}
|
||||
|
||||
const targetDir = "Docs/Tools/stats"
|
||||
if (process.argv.indexOf("--no-download") < 0) {
|
||||
await new StatsDownloader("stats").DownloadStats()
|
||||
await new StatsDownloader(targetDir).DownloadStats()
|
||||
}
|
||||
const allPaths = readdirSync("stats")
|
||||
const allPaths = readdirSync(targetDir)
|
||||
.filter(p => p.startsWith("stats.") && p.endsWith(".json"));
|
||||
let allFeatures: ChangeSetData[] = [].concat(...allPaths
|
||||
.map(path => JSON.parse(readFileSync("stats/" + path, "utf-8")).features
|
||||
.map(path => JSON.parse(readFileSync("Docs/Tools/stats/" + path, "utf-8")).features
|
||||
.map(cs => ChangesetDataTools.cleanChangesetData(cs))));
|
||||
allFeatures = allFeatures.filter(f => f.properties.editor === null || f.properties.editor.toLowerCase().startsWith("mapcomplete"))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/bash
|
||||
#! /usr/bin/env bash
|
||||
|
||||
ts-node GenerateSeries.ts
|
||||
# Move to the root of the repo
|
||||
|
|
4337
Docs/Tools/stats/stats.2022-5-01.json
Normal file
4337
Docs/Tools/stats/stats.2022-5-01.json
Normal file
File diff suppressed because it is too large
Load diff
4366
Docs/Tools/stats/stats.2022-5-02.json
Normal file
4366
Docs/Tools/stats/stats.2022-5-02.json
Normal file
File diff suppressed because it is too large
Load diff
1966
Docs/Tools/stats/stats.2022-5-03.json
Normal file
1966
Docs/Tools/stats/stats.2022-5-03.json
Normal file
File diff suppressed because it is too large
Load diff
2080
Docs/Tools/stats/stats.2022-5-04.json
Normal file
2080
Docs/Tools/stats/stats.2022-5-04.json
Normal file
File diff suppressed because it is too large
Load diff
2247
Docs/Tools/stats/stats.2022-5-05.json
Normal file
2247
Docs/Tools/stats/stats.2022-5-05.json
Normal file
File diff suppressed because it is too large
Load diff
3361
Docs/Tools/stats/stats.2022-5-06.json
Normal file
3361
Docs/Tools/stats/stats.2022-5-06.json
Normal file
File diff suppressed because it is too large
Load diff
2874
Docs/Tools/stats/stats.2022-5-07.json
Normal file
2874
Docs/Tools/stats/stats.2022-5-07.json
Normal file
File diff suppressed because it is too large
Load diff
2842
Docs/Tools/stats/stats.2022-5-08.json
Normal file
2842
Docs/Tools/stats/stats.2022-5-08.json
Normal file
File diff suppressed because it is too large
Load diff
2518
Docs/Tools/stats/stats.2022-5-09.json
Normal file
2518
Docs/Tools/stats/stats.2022-5-09.json
Normal file
File diff suppressed because it is too large
Load diff
3082
Docs/Tools/stats/stats.2022-5-10.json
Normal file
3082
Docs/Tools/stats/stats.2022-5-10.json
Normal file
File diff suppressed because it is too large
Load diff
1677
Docs/Tools/stats/stats.2022-5-11.json
Normal file
1677
Docs/Tools/stats/stats.2022-5-11.json
Normal file
File diff suppressed because it is too large
Load diff
1178
Docs/Tools/stats/stats.2022-5-12.json
Normal file
1178
Docs/Tools/stats/stats.2022-5-12.json
Normal file
File diff suppressed because it is too large
Load diff
1288
Docs/Tools/stats/stats.2022-5-13.json
Normal file
1288
Docs/Tools/stats/stats.2022-5-13.json
Normal file
File diff suppressed because it is too large
Load diff
1199
Docs/Tools/stats/stats.2022-5-14.json
Normal file
1199
Docs/Tools/stats/stats.2022-5-14.json
Normal file
File diff suppressed because it is too large
Load diff
1853
Docs/Tools/stats/stats.2022-5-15.json
Normal file
1853
Docs/Tools/stats/stats.2022-5-15.json
Normal file
File diff suppressed because it is too large
Load diff
2354
Docs/Tools/stats/stats.2022-5-16.json
Normal file
2354
Docs/Tools/stats/stats.2022-5-16.json
Normal file
File diff suppressed because it is too large
Load diff
3491
Docs/Tools/stats/stats.2022-5-17.json
Normal file
3491
Docs/Tools/stats/stats.2022-5-17.json
Normal file
File diff suppressed because it is too large
Load diff
3995
Docs/Tools/stats/stats.2022-5-18.json
Normal file
3995
Docs/Tools/stats/stats.2022-5-18.json
Normal file
File diff suppressed because it is too large
Load diff
1691
Docs/Tools/stats/stats.2022-5-19.json
Normal file
1691
Docs/Tools/stats/stats.2022-5-19.json
Normal file
File diff suppressed because it is too large
Load diff
2184
Docs/Tools/stats/stats.2022-5-20.json
Normal file
2184
Docs/Tools/stats/stats.2022-5-20.json
Normal file
File diff suppressed because it is too large
Load diff
2587
Docs/Tools/stats/stats.2022-5-21.json
Normal file
2587
Docs/Tools/stats/stats.2022-5-21.json
Normal file
File diff suppressed because it is too large
Load diff
1851
Docs/Tools/stats/stats.2022-5-22.json
Normal file
1851
Docs/Tools/stats/stats.2022-5-22.json
Normal file
File diff suppressed because it is too large
Load diff
1136
Docs/Tools/stats/stats.2022-5-23.json
Normal file
1136
Docs/Tools/stats/stats.2022-5-23.json
Normal file
File diff suppressed because it is too large
Load diff
1536
Docs/Tools/stats/stats.2022-5-24.json
Normal file
1536
Docs/Tools/stats/stats.2022-5-24.json
Normal file
File diff suppressed because it is too large
Load diff
742
Docs/Tools/stats/stats.2022-5-25.json
Normal file
742
Docs/Tools/stats/stats.2022-5-25.json
Normal file
|
@ -0,0 +1,742 @@
|
|||
{
|
||||
"features": [
|
||||
{
|
||||
"id": 121491888,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
-46.6898366,
|
||||
-23.5327703
|
||||
],
|
||||
[
|
||||
-46.6896214,
|
||||
-23.5327703
|
||||
],
|
||||
[
|
||||
-46.6896214,
|
||||
-23.5327365
|
||||
],
|
||||
[
|
||||
-46.6898366,
|
||||
-23.5327365
|
||||
],
|
||||
[
|
||||
-46.6898366,
|
||||
-23.5327703
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "homeroff",
|
||||
"uid": "445668",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #trees",
|
||||
"comments_count": 0,
|
||||
"source": "Not reported",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T20:19:10Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"natural": [
|
||||
"tree"
|
||||
]
|
||||
},
|
||||
"create": 2,
|
||||
"modify": 2,
|
||||
"delete": 0,
|
||||
"area": 7.27376000012149e-9,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/trees.html",
|
||||
"theme": "trees",
|
||||
"answer": 2,
|
||||
"create": 2,
|
||||
"locale": "en",
|
||||
"imagery": "osm",
|
||||
"add-image": 1
|
||||
},
|
||||
"id": 121491888
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121491116,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
-49.2326157,
|
||||
-25.4592628
|
||||
],
|
||||
[
|
||||
-49.2326157,
|
||||
-25.4592628
|
||||
],
|
||||
[
|
||||
-49.2326157,
|
||||
-25.4592628
|
||||
],
|
||||
[
|
||||
-49.2326157,
|
||||
-25.4592628
|
||||
],
|
||||
[
|
||||
-49.2326157,
|
||||
-25.4592628
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "Kauê de Moraes Vestena",
|
||||
"uid": "2052228",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #pets",
|
||||
"comments_count": 0,
|
||||
"source": "Not reported",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T19:55:13Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"amenity": [
|
||||
"veterinary"
|
||||
]
|
||||
},
|
||||
"create": 1,
|
||||
"modify": 0,
|
||||
"delete": 0,
|
||||
"area": 0,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/pets.html",
|
||||
"theme": "pets",
|
||||
"create": 1,
|
||||
"locale": "en",
|
||||
"imagery": "osm"
|
||||
},
|
||||
"id": 121491116
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121491040,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
-49.2312813,
|
||||
-25.4613879
|
||||
],
|
||||
[
|
||||
-49.2312813,
|
||||
-25.4613879
|
||||
],
|
||||
[
|
||||
-49.2312813,
|
||||
-25.4613879
|
||||
],
|
||||
[
|
||||
-49.2312813,
|
||||
-25.4613879
|
||||
],
|
||||
[
|
||||
-49.2312813,
|
||||
-25.4613879
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "Kauê de Moraes Vestena",
|
||||
"uid": "2052228",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #waste",
|
||||
"comments_count": 0,
|
||||
"source": "Not reported",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T19:53:35Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"amenity": [
|
||||
"waste_disposal"
|
||||
]
|
||||
},
|
||||
"create": 1,
|
||||
"modify": 0,
|
||||
"delete": 0,
|
||||
"area": 0,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/waste.html",
|
||||
"theme": "waste",
|
||||
"answer": 2,
|
||||
"create": 1,
|
||||
"locale": "en",
|
||||
"imagery": "osm"
|
||||
},
|
||||
"id": 121491040
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121490689,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
-49.2313738,
|
||||
-25.4612081
|
||||
],
|
||||
[
|
||||
-49.2313168,
|
||||
-25.4612081
|
||||
],
|
||||
[
|
||||
-49.2313168,
|
||||
-25.4611966
|
||||
],
|
||||
[
|
||||
-49.2313738,
|
||||
-25.4611966
|
||||
],
|
||||
[
|
||||
-49.2313738,
|
||||
-25.4612081
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "Kauê de Moraes Vestena",
|
||||
"uid": "2052228",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #trees",
|
||||
"comments_count": 0,
|
||||
"source": "Not reported",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T19:40:21Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"natural": [
|
||||
"tree"
|
||||
]
|
||||
},
|
||||
"create": 2,
|
||||
"modify": 0,
|
||||
"delete": 0,
|
||||
"area": 6.55499999944329e-10,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/trees.html",
|
||||
"theme": "trees",
|
||||
"create": 2,
|
||||
"locale": "en",
|
||||
"imagery": "osm"
|
||||
},
|
||||
"id": 121490689
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121485997,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
3.3906636,
|
||||
51.0715768
|
||||
],
|
||||
[
|
||||
3.3906636,
|
||||
51.0715768
|
||||
],
|
||||
[
|
||||
3.3906636,
|
||||
51.0715768
|
||||
],
|
||||
[
|
||||
3.3906636,
|
||||
51.0715768
|
||||
],
|
||||
[
|
||||
3.3906636,
|
||||
51.0715768
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "Thibaultmol",
|
||||
"uid": "2916921",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #cyclofix",
|
||||
"comments_count": 0,
|
||||
"source": "survey",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T17:23:25Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"amenity": [
|
||||
"bicycle_parking"
|
||||
]
|
||||
},
|
||||
"create": 1,
|
||||
"modify": 1,
|
||||
"delete": 0,
|
||||
"area": 0,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/cyclofix.html",
|
||||
"theme": "cyclofix",
|
||||
"answer": 4,
|
||||
"create": 1,
|
||||
"locale": "en",
|
||||
"imagery": "AGIV",
|
||||
"change_over_5000m": 1,
|
||||
"change_within_5000m": 4
|
||||
},
|
||||
"id": 121485997
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121485747,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
3.3906408,
|
||||
51.0715958
|
||||
],
|
||||
[
|
||||
3.3906408,
|
||||
51.0715958
|
||||
],
|
||||
[
|
||||
3.3906408,
|
||||
51.0715958
|
||||
],
|
||||
[
|
||||
3.3906408,
|
||||
51.0715958
|
||||
],
|
||||
[
|
||||
3.3906408,
|
||||
51.0715958
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "Thibaultmol",
|
||||
"uid": "2916921",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #bookcases",
|
||||
"comments_count": 0,
|
||||
"source": "survey",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T17:15:42Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"amenity": [
|
||||
"public_bookcase"
|
||||
]
|
||||
},
|
||||
"create": 1,
|
||||
"modify": 4,
|
||||
"delete": 0,
|
||||
"area": 0,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/bookcases.html",
|
||||
"theme": "bookcases",
|
||||
"answer": 4,
|
||||
"create": 1,
|
||||
"locale": "en",
|
||||
"imagery": "AGIV",
|
||||
"add-image": 1,
|
||||
"change_over_5000m": 1,
|
||||
"change_within_5000m": 5
|
||||
},
|
||||
"id": 121485747
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121479693,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
3.7530381,
|
||||
50.8628307
|
||||
],
|
||||
[
|
||||
3.7530381,
|
||||
50.8628307
|
||||
],
|
||||
[
|
||||
3.7530381,
|
||||
50.8628307
|
||||
],
|
||||
[
|
||||
3.7530381,
|
||||
50.8628307
|
||||
],
|
||||
[
|
||||
3.7530381,
|
||||
50.8628307
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "BBO1",
|
||||
"uid": "6159261",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
"comments_count": 0,
|
||||
"source": "Not reported",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T14:47:10Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"seats": [
|
||||
"4"
|
||||
],
|
||||
"amenity": [
|
||||
"bench"
|
||||
],
|
||||
"backrest": [
|
||||
"yes"
|
||||
],
|
||||
"material": [
|
||||
"houtpaletten"
|
||||
],
|
||||
"direction": [
|
||||
"59"
|
||||
]
|
||||
},
|
||||
"create": 0,
|
||||
"modify": 2,
|
||||
"delete": 0,
|
||||
"area": 0,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/toerisme_vlaanderen",
|
||||
"theme": "toerisme_vlaanderen",
|
||||
"answer": 4,
|
||||
"locale": "nl",
|
||||
"imagery": "CartoDB.Voyager"
|
||||
},
|
||||
"id": 121479693
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121478703,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
3.7106243,
|
||||
51.0332678
|
||||
],
|
||||
[
|
||||
3.7107396,
|
||||
51.0332678
|
||||
],
|
||||
[
|
||||
3.7107396,
|
||||
51.0337907
|
||||
],
|
||||
[
|
||||
3.7106243,
|
||||
51.0337907
|
||||
],
|
||||
[
|
||||
3.7106243,
|
||||
51.0332678
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [
|
||||
{
|
||||
"id": 40,
|
||||
"name": "New mapper"
|
||||
}
|
||||
],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "velosophe",
|
||||
"uid": "477861",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
"comments_count": 0,
|
||||
"source": "Not reported",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T14:23:47Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"amenity": [
|
||||
"bench"
|
||||
],
|
||||
"leisure": [
|
||||
"picnic_table"
|
||||
]
|
||||
},
|
||||
"create": 2,
|
||||
"modify": 2,
|
||||
"delete": 0,
|
||||
"area": 6.02903700000203e-8,
|
||||
"is_suspect": true,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/toerisme_vlaanderen.html",
|
||||
"theme": "toerisme_vlaanderen",
|
||||
"answer": 4,
|
||||
"create": 2,
|
||||
"locale": "nl",
|
||||
"imagery": "osm"
|
||||
},
|
||||
"id": 121478703
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121472054,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
9.1957978,
|
||||
48.6772682
|
||||
],
|
||||
[
|
||||
9.1957978,
|
||||
48.6772682
|
||||
],
|
||||
[
|
||||
9.1957978,
|
||||
48.6772682
|
||||
],
|
||||
[
|
||||
9.1957978,
|
||||
48.6772682
|
||||
],
|
||||
[
|
||||
9.1957978,
|
||||
48.6772682
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "5R-MFT",
|
||||
"uid": "3417876",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #charging_stations",
|
||||
"comments_count": 0,
|
||||
"source": "survey",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T11:51:02Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"bus": [
|
||||
"no"
|
||||
],
|
||||
"hgv": [
|
||||
"no"
|
||||
],
|
||||
"image": [
|
||||
"https://i.imgur.com/dEpfVBs.jpg"
|
||||
],
|
||||
"access": [
|
||||
"yes"
|
||||
],
|
||||
"amenity": [
|
||||
"charging_station"
|
||||
],
|
||||
"bicycle": [
|
||||
"no"
|
||||
],
|
||||
"scooter": [
|
||||
"no"
|
||||
],
|
||||
"motorcar": [
|
||||
"yes"
|
||||
]
|
||||
},
|
||||
"create": 0,
|
||||
"modify": 2,
|
||||
"delete": 0,
|
||||
"area": 0,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/charging_stations.html",
|
||||
"theme": "charging_stations",
|
||||
"answer": 2,
|
||||
"locale": "de",
|
||||
"imagery": "CartoDB.Voyager",
|
||||
"add-image": 1,
|
||||
"change_within_5000m": 3
|
||||
},
|
||||
"id": 121472054
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 121459068,
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
4.9773688,
|
||||
51.1091876
|
||||
],
|
||||
[
|
||||
4.9773688,
|
||||
51.1091876
|
||||
],
|
||||
[
|
||||
4.9773688,
|
||||
51.1091876
|
||||
],
|
||||
[
|
||||
4.9773688,
|
||||
51.1091876
|
||||
],
|
||||
[
|
||||
4.9773688,
|
||||
51.1091876
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"check_user": null,
|
||||
"reasons": [],
|
||||
"tags": [],
|
||||
"features": [],
|
||||
"user": "dentonny",
|
||||
"uid": "4198737",
|
||||
"editor": "MapComplete 0.19.2",
|
||||
"comment": "Adding data with #MapComplete for theme #benches",
|
||||
"comments_count": 0,
|
||||
"source": "survey",
|
||||
"imagery_used": "Not reported",
|
||||
"date": "2022-05-25T07:05:53Z",
|
||||
"reviewed_features": [],
|
||||
"tag_changes": {
|
||||
"image": [
|
||||
"https://i.imgur.com/CwoOjPt.jpg"
|
||||
],
|
||||
"colour": [
|
||||
"black"
|
||||
],
|
||||
"amenity": [
|
||||
"bench"
|
||||
],
|
||||
"direction": [
|
||||
"330"
|
||||
],
|
||||
"survey:date": [
|
||||
"2022-05-25"
|
||||
]
|
||||
},
|
||||
"create": 0,
|
||||
"modify": 1,
|
||||
"delete": 0,
|
||||
"area": 0,
|
||||
"is_suspect": false,
|
||||
"harmful": null,
|
||||
"checked": false,
|
||||
"check_date": null,
|
||||
"metadata": {
|
||||
"host": "https://mapcomplete.osm.be/benches.html",
|
||||
"theme": "benches",
|
||||
"answer": 3,
|
||||
"locale": "nl",
|
||||
"imagery": "osm",
|
||||
"add-image": 1,
|
||||
"change_within_25m": 4
|
||||
},
|
||||
"id": 121459068
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
2181
Docs/Tools/stats/stats.2022-5-26.json
Normal file
2181
Docs/Tools/stats/stats.2022-5-26.json
Normal file
File diff suppressed because it is too large
Load diff
1758
Docs/Tools/stats/stats.2022-5-27.json
Normal file
1758
Docs/Tools/stats/stats.2022-5-27.json
Normal file
File diff suppressed because it is too large
Load diff
2455
Docs/Tools/stats/stats.2022-5-28.json
Normal file
2455
Docs/Tools/stats/stats.2022-5-28.json
Normal file
File diff suppressed because it is too large
Load diff
2845
Docs/Tools/stats/stats.2022-5-29.json
Normal file
2845
Docs/Tools/stats/stats.2022-5-29.json
Normal file
File diff suppressed because it is too large
Load diff
1986
Docs/Tools/stats/stats.2022-5-30.json
Normal file
1986
Docs/Tools/stats/stats.2022-5-30.json
Normal file
File diff suppressed because it is too large
Load diff
2076
Docs/Tools/stats/stats.2022-5-31.json
Normal file
2076
Docs/Tools/stats/stats.2022-5-31.json
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1162
Docs/Tools/stats/stats.2022-6-01.json
Normal file
1162
Docs/Tools/stats/stats.2022-6-01.json
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue