forked from MapComplete/MapComplete
Merge develop
This commit is contained in:
commit
15e6fde194
275 changed files with 786405 additions and 39150 deletions
|
@ -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();
|
||||
|
@ -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 @@ Bicycle rental stations
|
|||
|
||||
|
||||
- [bicycle_rental](https://mapcomplete.osm.be/bicycle_rental)
|
||||
- [cyclofix](https://mapcomplete.osm.be/cyclofix)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
|
401
Docs/Layers/bicycle_rental_non_docking.md
Normal file
401
Docs/Layers/bicycle_rental_non_docking.md
Normal file
|
@ -0,0 +1,401 @@
|
|||
|
||||
|
||||
bicycle_rental_non_docking
|
||||
============================
|
||||
|
||||
|
||||
|
||||
<img src='https://mapcomplete.osm.be/pin:#ba2792;./assets/themes/cyclofix/key.svg' height="100px">
|
||||
|
||||
Bicycle rental stations
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This layer is shown at zoomlevel **14** and higher
|
||||
|
||||
|
||||
|
||||
|
||||
#### Themes using this layer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [cyclofix](https://mapcomplete.osm.be/cyclofix)
|
||||
|
||||
|
||||
|
||||
|
||||
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:amenity' target='_blank'>amenity</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dbicycle_rental' target='_blank'>bicycle_rental</a>|bicycle_rental~^..*$|<a href='https://wiki.openstreetmap.org/wiki/Key:service:bicycle:rental' target='_blank'>service:bicycle:rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:service:bicycle:rental%3Dyes' target='_blank'>yes</a>|rental~^.*bicycle.*$
|
||||
- bicycle_rental!=docking_station
|
||||
|
||||
|
||||
[Execute on overpass](http://overpass-turbo.eu/?Q=%5Bout%3Ajson%5D%5Btimeout%3A90%5D%3B(%20%20%20%20nwr%5B%22amenity%22%3D%22bicycle_rental%22%5D%5B%22bicycle_rental%22!%3D%22docking_station%22%5D(%7B%7Bbbox%7D%7D)%3B%0A%20%20%20%20nwr%5B%22service%3Abicycle%3Arental%22%3D%22yes%22%5D%5B%22bicycle_rental%22!%3D%22docking_station%22%5D(%7B%7Bbbox%7D%7D)%3B%0A%20%20%20%20nwr%5B%22bicycle_rental%22%5D%5B%22bicycle_rental%22!%3D%22docking_station%22%5D(%7B%7Bbbox%7D%7D)%3B%0A%20%20%20%20nwr%5B%22rental%22~%22%5E.*bicycle.*%24%22%5D%5B%22bicycle_rental%22!%3D%22docking_station%22%5D(%7B%7Bbbox%7D%7D)%3B%0A)%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B)
|
||||
|
||||
|
||||
|
||||
Supported attributes
|
||||
----------------------
|
||||
|
||||
|
||||
|
||||
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/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/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/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/opening_hours#values) [opening_hours](https://wiki.openstreetmap.org/wiki/Key:opening_hours) | [opening_hours](../SpecialInputElements.md#opening_hours) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/rental#values) [rental](https://wiki.openstreetmap.org/wiki/Key:rental) | [string](../SpecialInputElements.md#string) | [city_bike](https://wiki.openstreetmap.org/wiki/Tag:rental%3Dcity_bike) [ebike](https://wiki.openstreetmap.org/wiki/Tag:rental%3Debike) [bmx](https://wiki.openstreetmap.org/wiki/Tag:rental%3Dbmx) [mtb](https://wiki.openstreetmap.org/wiki/Tag:rental%3Dmtb) [kid_bike](https://wiki.openstreetmap.org/wiki/Tag:rental%3Dkid_bike) [tandem](https://wiki.openstreetmap.org/wiki/Tag:rental%3Dtandem) [racebike](https://wiki.openstreetmap.org/wiki/Tag:rental%3Dracebike) [bike_helmet](https://wiki.openstreetmap.org/wiki/Tag:rental%3Dbike_helmet)
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:city_bike#values) [capacity:city_bike](https://wiki.openstreetmap.org/wiki/Key:capacity:city_bike) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:ebike#values) [capacity:ebike](https://wiki.openstreetmap.org/wiki/Key:capacity:ebike) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:kid_bike#values) [capacity:kid_bike](https://wiki.openstreetmap.org/wiki/Key:capacity:kid_bike) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:bmx#values) [capacity:bmx](https://wiki.openstreetmap.org/wiki/Key:capacity:bmx) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:mtb#values) [capacity:mtb](https://wiki.openstreetmap.org/wiki/Key:capacity:mtb) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:bicycle_pannier#values) [capacity:bicycle_pannier](https://wiki.openstreetmap.org/wiki/Key:capacity:bicycle_pannier) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/capacity:tandem_bicycle#values) [capacity:tandem_bicycle](https://wiki.openstreetmap.org/wiki/Key:capacity:tandem_bicycle) | [pnat](../SpecialInputElements.md#pnat) |
|
||||
|
||||
|
||||
|
||||
|
||||
### images
|
||||
|
||||
|
||||
|
||||
This tagrendering has no question and is thus read-only
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### bicycle_rental_type
|
||||
|
||||
|
||||
|
||||
The question is What kind of bicycle rental is this?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This is a shop whose main focus is bicycle rental corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:shop' target='_blank'>shop</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:shop%3Drental' target='_blank'>rental</a>&<a href='https://wiki.openstreetmap.org/wiki/Key:bicycle_rental' target='_blank'>bicycle_rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:bicycle_rental%3Dshop' target='_blank'>shop</a>
|
||||
- This is a rental buisiness which rents out various objects and/or vehicles. It rents out bicycles too, but this is not the main focus corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:shop' target='_blank'>shop</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:shop%3Drental' target='_blank'>rental</a>
|
||||
- This is a shop which sells or repairs bicycles, but also rents out bicycles corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:service:bicycle:rental' target='_blank'>service:bicycle:rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:service:bicycle:rental%3Dyes' target='_blank'>yes</a>&<a href='https://wiki.openstreetmap.org/wiki/Key:shop' target='_blank'>shop</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:shop%3Dbicycle' target='_blank'>bicycle</a>
|
||||
- This is an automated docking station, where a bicycle is mechanically locked into a structure corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:bicycle_rental' target='_blank'>bicycle_rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:bicycle_rental%3Ddocking_station' target='_blank'>docking_station</a>
|
||||
- A machine is present which dispenses and accepts keys, eventually after authentication and/or payment. The bicycles are parked nearby corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:bicycle_rental' target='_blank'>bicycle_rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:bicycle_rental%3Dkey_dispensing_machine' target='_blank'>key_dispensing_machine</a>
|
||||
- This is a dropoff point, e.g. a reserved parking to place the bicycles which clearly marked as being for the rental service only corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:bicycle_rental' target='_blank'>bicycle_rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:bicycle_rental%3Ddropoff_point' target='_blank'>dropoff_point</a>
|
||||
|
||||
|
||||
Only visible if `amenity=bicycle_rental` is shown
|
||||
|
||||
|
||||
|
||||
### website
|
||||
|
||||
|
||||
|
||||
The question is What is the website of {title()}?
|
||||
|
||||
This rendering asks information about the property [website](https://wiki.openstreetmap.org/wiki/Key:website)
|
||||
|
||||
This is rendered with <a href='{website}' target='_blank'>{website}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- <a href='{contact:website}' target='_blank'>{contact:website}</a> corresponds with contact:website~^..*$
|
||||
- This option cannot be chosen as answer
|
||||
|
||||
|
||||
|
||||
|
||||
### email
|
||||
|
||||
|
||||
|
||||
The question is What is the email address of {title()}?
|
||||
|
||||
This rendering asks information about the property [email](https://wiki.openstreetmap.org/wiki/Key:email)
|
||||
|
||||
This is rendered with <a href='mailto:{email}' target='_blank'>{email}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- <a href='mailto:{contact:email}' target='_blank'>{contact:email}</a> corresponds with contact:email~^..*$
|
||||
- This option cannot be chosen as answer
|
||||
|
||||
|
||||
|
||||
|
||||
### phone
|
||||
|
||||
|
||||
|
||||
The question is What is the phone number of {title()}?
|
||||
|
||||
This rendering asks information about the property [phone](https://wiki.openstreetmap.org/wiki/Key:phone)
|
||||
|
||||
This is rendered with <a href='tel:{phone}'>{phone}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- <a href='tel:{contact:phone}'>{contact:phone}</a> corresponds with contact:phone~^..*$
|
||||
- This option cannot be chosen as answer
|
||||
|
||||
|
||||
|
||||
|
||||
### opening_hours
|
||||
|
||||
|
||||
|
||||
The question is What are the opening hours of {title()}?
|
||||
|
||||
This rendering asks information about the property [opening_hours](https://wiki.openstreetmap.org/wiki/Key:opening_hours)
|
||||
|
||||
This is rendered with <h3>Opening hours</h3>{opening_hours_table(opening_hours)}
|
||||
|
||||
|
||||
|
||||
Only visible if `shop~^..*$|opening_hours~^..*$` is shown
|
||||
|
||||
|
||||
|
||||
### payment-options
|
||||
|
||||
|
||||
|
||||
The question is Which methods of payment are accepted here?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- Cash is accepted here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cash' target='_blank'>payment:cash</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cash%3Dyes' target='_blank'>yes</a>
|
||||
- Unselecting this answer will add <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cash' target='_blank'>payment:cash</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cash%3Dno' target='_blank'>no</a>
|
||||
- Payment cards are accepted here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cards' target='_blank'>payment:cards</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cards%3Dyes' target='_blank'>yes</a>
|
||||
- Unselecting this answer will add <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cards' target='_blank'>payment:cards</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cards%3Dno' target='_blank'>no</a>
|
||||
|
||||
|
||||
Only visible if `shop~^..*$` is shown
|
||||
|
||||
|
||||
|
||||
### payment-options-advanced
|
||||
|
||||
|
||||
|
||||
The question is Which methods of payment are accepted here?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- Cash is accepted here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cash' target='_blank'>payment:cash</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cash%3Dyes' target='_blank'>yes</a>
|
||||
- Unselecting this answer will add <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cash' target='_blank'>payment:cash</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cash%3Dno' target='_blank'>no</a>
|
||||
- Payment cards are accepted here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cards' target='_blank'>payment:cards</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cards%3Dyes' target='_blank'>yes</a>
|
||||
- Unselecting this answer will add <a href='https://wiki.openstreetmap.org/wiki/Key:payment:cards' target='_blank'>payment:cards</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:cards%3Dno' target='_blank'>no</a>
|
||||
- Payment is done using a dedicated app corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:payment:app' target='_blank'>payment:app</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:app%3Dyes' target='_blank'>yes</a>
|
||||
- Unselecting this answer will add <a href='https://wiki.openstreetmap.org/wiki/Key:payment:app' target='_blank'>payment:app</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:app%3Dno' target='_blank'>no</a>
|
||||
- Payment is done using a membership card corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:payment:membership_card' target='_blank'>payment:membership_card</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:membership_card%3Dyes' target='_blank'>yes</a>
|
||||
- Unselecting this answer will add <a href='https://wiki.openstreetmap.org/wiki/Key:payment:membership_card' target='_blank'>payment:membership_card</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:payment:membership_card%3Dno' target='_blank'>no</a>
|
||||
|
||||
|
||||
|
||||
|
||||
### bicycle-types
|
||||
|
||||
|
||||
|
||||
The question is What kind of bicycles and accessories are rented here?
|
||||
|
||||
This rendering asks information about the property [rental](https://wiki.openstreetmap.org/wiki/Key:rental)
|
||||
|
||||
This is rendered with {rental} is rented here
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- Normal city bikes can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Dcity_bike' target='_blank'>city_bike</a>
|
||||
- Electrical bikes can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Debike' target='_blank'>ebike</a>
|
||||
- BMX bikes can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Dbmx' target='_blank'>bmx</a>
|
||||
- Mountainbikes can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Dmtb' target='_blank'>mtb</a>
|
||||
- Bikes for children can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Dkid_bike' target='_blank'>kid_bike</a>
|
||||
- Tandem bicycles can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Dtandem' target='_blank'>tandem</a>
|
||||
- Race bicycles can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Dracebike' target='_blank'>racebike</a>
|
||||
- Bike helmets can be rented here corresponds with <a href='https://wiki.openstreetmap.org/wiki/Key:rental' target='_blank'>rental</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:rental%3Dbike_helmet' target='_blank'>bike_helmet</a>
|
||||
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### rental-capacity-city_bike
|
||||
|
||||
|
||||
|
||||
The question is How much city bikes can be rented here?
|
||||
|
||||
This rendering asks information about the property [capacity:city_bike](https://wiki.openstreetmap.org/wiki/Key:capacity:city_bike)
|
||||
|
||||
This is rendered with {capacity:city_bike} city bikes can be rented here
|
||||
|
||||
|
||||
|
||||
Only visible if `rental~^.*city_bike.*$` is shown
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### rental-capacity-ebike
|
||||
|
||||
|
||||
|
||||
The question is How much electrical bikes can be rented here?
|
||||
|
||||
This rendering asks information about the property [capacity:ebike](https://wiki.openstreetmap.org/wiki/Key:capacity:ebike)
|
||||
|
||||
This is rendered with {capacity:ebike} electrical bikes can be rented here
|
||||
|
||||
|
||||
|
||||
Only visible if `rental~^.*ebike.*$` is shown
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### rental-capacity-kid_bike
|
||||
|
||||
|
||||
|
||||
The question is How much bikes for children can be rented here?
|
||||
|
||||
This rendering asks information about the property [capacity:kid_bike](https://wiki.openstreetmap.org/wiki/Key:capacity:kid_bike)
|
||||
|
||||
This is rendered with {capacity:kid_bike} bikes for children can be rented here
|
||||
|
||||
|
||||
|
||||
Only visible if `rental~^.*kid_bike.*$` is shown
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### rental-capacity-bmx
|
||||
|
||||
|
||||
|
||||
The question is How much BMX bikes can be rented here?
|
||||
|
||||
This rendering asks information about the property [capacity:bmx](https://wiki.openstreetmap.org/wiki/Key:capacity:bmx)
|
||||
|
||||
This is rendered with {capacity:bmx} BMX bikes can be rented here
|
||||
|
||||
|
||||
|
||||
Only visible if `rental~^.*bmx.*$` is shown
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### rental-capacity-mtb
|
||||
|
||||
|
||||
|
||||
The question is How much mountainbike can be rented here?
|
||||
|
||||
This rendering asks information about the property [capacity:mtb](https://wiki.openstreetmap.org/wiki/Key:capacity:mtb)
|
||||
|
||||
This is rendered with {capacity:mtb} mountainbike can be rented here
|
||||
|
||||
|
||||
|
||||
Only visible if `rental~^.*mtb.*$` is shown
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### rental-capacity-bicycle_pannier
|
||||
|
||||
|
||||
|
||||
The question is How much bicycle panniers can be rented here?
|
||||
|
||||
This rendering asks information about the property [capacity:bicycle_pannier](https://wiki.openstreetmap.org/wiki/Key:capacity:bicycle_pannier)
|
||||
|
||||
This is rendered with {capacity:bicycle_pannier} bicycle panniers can be rented here
|
||||
|
||||
|
||||
|
||||
Only visible if `rental~^.*bicycle_pannier.*$` is shown
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### rental-capacity-tandem_bicycle
|
||||
|
||||
|
||||
|
||||
The question is How much tandem can be rented here?
|
||||
|
||||
This rendering asks information about the property [capacity:tandem_bicycle](https://wiki.openstreetmap.org/wiki/Key:capacity:tandem_bicycle)
|
||||
|
||||
This is rendered with {capacity:tandem_bicycle} tandem can be rented here
|
||||
|
||||
|
||||
|
||||
Only visible if `rental~^.*tandem_bicycle.*$` is shown
|
||||
|
||||
This tagrendering has labels `bicycle_rental`
|
||||
|
||||
|
||||
|
||||
### 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/cyclofix/cyclofix.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/themes/cyclofix/cyclofix.json)
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
@ -31,6 +32,7 @@ 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)
|
||||
- [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -62,6 +64,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 +154,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
|
||||
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ A layer showing entrances and offering capabilities to survey some advanced data
|
|||
- This layer is shown at zoomlevel **14** and higher
|
||||
- This layer will automatically load [walls_and_buildings](./walls_and_buildings.md) into the layout as it depends on it: a preset snaps to this layer (presets[0])
|
||||
- This layer will automatically load [pedestrian_path](./pedestrian_path.md) into the layout as it depends on it: a preset snaps to this layer (presets[0])
|
||||
- This layer is needed as dependency for layer [walls_and_buildings](#walls_and_buildings)
|
||||
|
||||
|
||||
|
||||
|
@ -29,6 +30,7 @@ A layer showing entrances and offering capabilities to survey some advanced data
|
|||
|
||||
- [entrances](https://mapcomplete.osm.be/entrances)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [walls_and_buildings](https://mapcomplete.osm.be/walls_and_buildings)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -121,7 +121,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}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,18 @@ Shows kindergartens and preschools. Both are grouped in one layer, as they are r
|
|||
|
||||
|
||||
|
||||
#### Themes using this layer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [education](https://mapcomplete.osm.be/education)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
||||
|
||||
Basic tags for this layer
|
||||
---------------------------
|
||||
|
||||
|
|
|
@ -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`
|
||||
|
||||
|
||||
|
|
|
@ -53,6 +53,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 +74,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)
|
|
@ -28,6 +28,7 @@ Pedestrian footpaths, especially used for indoor navigation and snapping entranc
|
|||
|
||||
- [entrances](https://mapcomplete.osm.be/entrances)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [walls_and_buildings](https://mapcomplete.osm.be/walls_and_buildings)
|
||||
|
||||
|
||||
|
||||
|
|
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)
|
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,18 @@ Layer with all tertiary education institutes (ISCED:2011 levels 6,7 and 8)
|
|||
|
||||
|
||||
|
||||
#### Themes using this layer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- [education](https://mapcomplete.osm.be/education)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
|
||||
|
||||
|
||||
|
||||
Basic tags for this layer
|
||||
---------------------------
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ Special builtin layer providing all walls and buildings. This layer is useful in
|
|||
- This layer is not visible by default and must be enabled in the filter by the user.
|
||||
- Not visible in the layer selection by default. If you want to make this layer toggable, override `name`
|
||||
- Not rendered on the map by default. If you want to rendering this on the map, override `mapRenderings`
|
||||
- This layer will automatically load [entrance](./entrance.md) into the layout as it depends on it: a calculated tag loads features from this layer (calculatedTag[0] which calculates the value for _entrance_properties)
|
||||
- This layer is needed as dependency for layer [defibrillator](#defibrillator)
|
||||
- This layer is needed as dependency for layer [entrance](#entrance)
|
||||
- This layer is needed as dependency for layer [surveillance_camera](#surveillance_camera)
|
||||
|
@ -35,6 +36,7 @@ Special builtin layer providing all walls and buildings. This layer is useful in
|
|||
- [entrances](https://mapcomplete.osm.be/entrances)
|
||||
- [personal](https://mapcomplete.osm.be/personal)
|
||||
- [surveillance](https://mapcomplete.osm.be/surveillance)
|
||||
- [walls_and_buildings](https://mapcomplete.osm.be/walls_and_buildings)
|
||||
|
||||
|
||||
|
||||
|
@ -58,6 +60,36 @@ Elements must have the all of following tags to be shown on this layer:
|
|||
Supported attributes
|
||||
----------------------
|
||||
|
||||
|
||||
|
||||
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/_entrance:width#values) [_entrance:width](https://wiki.openstreetmap.org/wiki/Key:_entrance:width) | [string](../SpecialInputElements.md#string) | [](https://wiki.openstreetmap.org/wiki/Tag:_entrance:width%3D)
|
||||
|
||||
|
||||
|
||||
|
||||
### _entrance:width
|
||||
|
||||
|
||||
|
||||
This tagrendering has no question and is thus read-only
|
||||
|
||||
This rendering asks information about the property [_entrance:width](https://wiki.openstreetmap.org/wiki/Key:_entrance:width)
|
||||
|
||||
This is rendered with <a href ='#{_entrance:id} '>This door has a width of {canonical(_entrance:width)} meters </a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- This entrance has no width information corresponds with
|
||||
|
||||
|
||||
This document is autogenerated from [assets/layers/walls_and_buildings/walls_and_buildings.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/layers/walls_and_buildings/walls_and_buildings.json)
|
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#"
|
||||
}
|
|
@ -116,6 +116,210 @@
|
|||
"key": "opening_hours",
|
||||
"description": "Layer 'Bike cafe' shows and asks freeform values for key 'opening_hours' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "amenity",
|
||||
"description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bicycle rental showing features with this tag",
|
||||
"value": "bicycle_rental"
|
||||
},
|
||||
{
|
||||
"key": "bicycle_rental",
|
||||
"description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bicycle rental showing features with this tag"
|
||||
},
|
||||
{
|
||||
"key": "service:bicycle:rental",
|
||||
"description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bicycle rental showing features with this tag",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bicycle rental showing features with this tag"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"description": "The layer 'Bicycle rental 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 'Bicycle rental 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 'Bicycle rental 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 'Bicycle rental 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": "shop",
|
||||
"description": "Layer 'Bicycle rental' shows shop=rental&bicycle_rental=shop with a fixed text, namely 'This is a shop whose main focus is bicycle rental' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "rental"
|
||||
},
|
||||
{
|
||||
"key": "bicycle_rental",
|
||||
"description": "Layer 'Bicycle rental' shows shop=rental&bicycle_rental=shop with a fixed text, namely 'This is a shop whose main focus is bicycle rental' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "shop"
|
||||
},
|
||||
{
|
||||
"key": "shop",
|
||||
"description": "Layer 'Bicycle rental' shows shop=rental with a fixed text, namely 'This is a rental buisiness which rents out various objects and/or vehicles. It rents out bicycles too, but this is not the main focus' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "rental"
|
||||
},
|
||||
{
|
||||
"key": "service:bicycle:rental",
|
||||
"description": "Layer 'Bicycle rental' shows service:bicycle:rental=yes&shop=bicycle with a fixed text, namely 'This is a shop which sells or repairs bicycles, but also rents out bicycles' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "shop",
|
||||
"description": "Layer 'Bicycle rental' shows service:bicycle:rental=yes&shop=bicycle with a fixed text, namely 'This is a shop which sells or repairs bicycles, but also rents out bicycles' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "bicycle"
|
||||
},
|
||||
{
|
||||
"key": "bicycle_rental",
|
||||
"description": "Layer 'Bicycle rental' shows bicycle_rental=docking_station with a fixed text, namely 'This is an automated docking station, where a bicycle is mechanically locked into a structure' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "docking_station"
|
||||
},
|
||||
{
|
||||
"key": "bicycle_rental",
|
||||
"description": "Layer 'Bicycle rental' shows bicycle_rental=key_dispensing_machine with a fixed text, namely 'A machine is present which dispenses and accepts keys, eventually after authentication and/or payment. The bicycles are parked nearby' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "key_dispensing_machine"
|
||||
},
|
||||
{
|
||||
"key": "bicycle_rental",
|
||||
"description": "Layer 'Bicycle rental' shows bicycle_rental=dropoff_point with a fixed text, namely 'This is a dropoff point, e.g. a reserved parking to place the bicycles which clearly marked as being for the rental service only' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "dropoff_point"
|
||||
},
|
||||
{
|
||||
"key": "website",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'website' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "contact:website",
|
||||
"description": "Layer 'Bicycle rental' shows contact:website~^..*$ with a fixed text, namely '<a href='{contact:website}' target='_blank'>{contact:website}</a>' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "email",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'email' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "contact:email",
|
||||
"description": "Layer 'Bicycle rental' shows contact:email~^..*$ with a fixed text, namely '<a href='mailto:{contact:email}' target='_blank'>{contact:email}</a>' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "phone",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'phone' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "contact:phone",
|
||||
"description": "Layer 'Bicycle rental' shows contact:phone~^..*$ with a fixed text, namely '<a href='tel:{contact:phone}'>{contact:phone}</a>' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "opening_hours",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'opening_hours' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "payment:cash",
|
||||
"description": "Layer 'Bicycle rental' shows payment:cash=yes with a fixed text, namely 'Cash is accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "payment:cards",
|
||||
"description": "Layer 'Bicycle rental' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "payment:cash",
|
||||
"description": "Layer 'Bicycle rental' shows payment:cash=yes with a fixed text, namely 'Cash is accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "payment:cards",
|
||||
"description": "Layer 'Bicycle rental' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "payment:app",
|
||||
"description": "Layer 'Bicycle rental' shows payment:app=yes with a fixed text, namely 'Payment is done using a dedicated app' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "payment:membership_card",
|
||||
"description": "Layer 'Bicycle rental' shows payment:membership_card=yes with a fixed text, namely 'Payment is done using a membership card' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'rental' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=city_bike with a fixed text, namely 'Normal city bikes can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "city_bike"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=ebike with a fixed text, namely 'Electrical bikes can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "ebike"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=bmx with a fixed text, namely 'BMX bikes can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "bmx"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=mtb with a fixed text, namely 'Mountainbikes can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "mtb"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=kid_bike with a fixed text, namely 'Bikes for children can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "kid_bike"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=tandem with a fixed text, namely 'Tandem bicycles can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "tandem"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=racebike with a fixed text, namely 'Race bicycles can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "racebike"
|
||||
},
|
||||
{
|
||||
"key": "rental",
|
||||
"description": "Layer 'Bicycle rental' shows rental=bike_helmet with a fixed text, namely 'Bike helmets can be rented here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
|
||||
"value": "bike_helmet"
|
||||
},
|
||||
{
|
||||
"key": "capacity:city_bike",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'capacity:city_bike' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:ebike",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'capacity:ebike' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:kid_bike",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'capacity:kid_bike' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:bmx",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'capacity:bmx' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:mtb",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'capacity:mtb' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:bicycle_pannier",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'capacity:bicycle_pannier' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "capacity:tandem_bicycle",
|
||||
"description": "Layer 'Bicycle rental' shows and asks freeform values for key 'capacity:tandem_bicycle' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
|
||||
},
|
||||
{
|
||||
"key": "shop",
|
||||
"description": "The MapComplete theme Cyclofix - an open map for cyclists has a layer Bike repair/shop showing features with this tag",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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')"
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load diff
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",
|
||||
|
|
223
Docs/TagInfo/mapcomplete_walls_and_buildings.json
Normal file
223
Docs/TagInfo/mapcomplete_walls_and_buildings.json
Normal file
|
@ -0,0 +1,223 @@
|
|||
{
|
||||
"data_format": 1,
|
||||
"project": {
|
||||
"name": "MapComplete Walls and buildings",
|
||||
"description": "Special builtin layer providing all walls and buildings",
|
||||
"project_url": "https://mapcomplete.osm.be/walls_and_buildings",
|
||||
"doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/",
|
||||
"icon_url": "https://mapcomplete.osm.be/assets/layers/walls_and_buildings/walls_and_buildings.png",
|
||||
"contact_name": "Pieter Vander Vennet, MapComplete",
|
||||
"contact_email": "pietervdvn@posteo.net"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"key": "highway",
|
||||
"description": "The MapComplete theme Walls and buildings has a layer Pedestrian paths showing features with this tag",
|
||||
"value": "footway"
|
||||
},
|
||||
{
|
||||
"key": "highway",
|
||||
"description": "The MapComplete theme Walls and buildings has a layer Pedestrian paths showing features with this tag",
|
||||
"value": "path"
|
||||
},
|
||||
{
|
||||
"key": "highway",
|
||||
"description": "The MapComplete theme Walls and buildings has a layer Pedestrian paths showing features with this tag",
|
||||
"value": "corridor"
|
||||
},
|
||||
{
|
||||
"key": "highway",
|
||||
"description": "The MapComplete theme Walls and buildings has a layer Pedestrian paths showing features with this tag",
|
||||
"value": "steps"
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "The MapComplete theme Walls and buildings has a layer Entrance showing features with this tag"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "The MapComplete theme Walls and buildings has a layer Entrance showing features with this tag",
|
||||
"value": "door"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"description": "The layer 'Entrance 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 'Entrance 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 'Entrance 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 'Entrance 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": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=yes with a fixed text, namely 'No specific entrance type is known' (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows indoor=door with a fixed text, namely 'This is an indoor door, separating a room or a corridor within a single building' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key entrance.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows indoor=door with a fixed text, namely 'This is an indoor door, separating a room or a corridor within a single building' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "door"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows entrance=main with a fixed text, namely 'This is the main entrance' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key indoor.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=main with a fixed text, namely 'This is the main entrance' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "main"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows entrance=secondary with a fixed text, namely 'This is a secondary entrance' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key indoor.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=secondary with a fixed text, namely 'This is a secondary entrance' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "secondary"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows entrance=service with a fixed text, namely 'This is a service entrance - normally only used for employees, delivery, …' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key indoor.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=service with a fixed text, namely 'This is a service entrance - normally only used for employees, delivery, …' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "service"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows entrance=exit with a fixed text, namely 'This is an exit where one can not enter' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key indoor.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=exit with a fixed text, namely 'This is an exit where one can not enter' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "exit"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows entrance=entrance with a fixed text, namely 'This is an entrance where one can only enter (but not exit)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key indoor.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=entrance with a fixed text, namely 'This is an entrance where one can only enter (but not exit)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "entrance"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows entrance=emergency with a fixed text, namely 'This is emergency exit' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key indoor.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=emergency with a fixed text, namely 'This is emergency exit' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "emergency"
|
||||
},
|
||||
{
|
||||
"key": "indoor",
|
||||
"description": "Layer 'Entrance' shows entrance=home with a fixed text, namely 'This is the entrance to a private home' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings') Picking this answer will delete the key indoor.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "entrance",
|
||||
"description": "Layer 'Entrance' shows entrance=home with a fixed text, namely 'This is the entrance to a private home' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "home"
|
||||
},
|
||||
{
|
||||
"key": "door",
|
||||
"description": "Layer 'Entrance' shows door=yes with a fixed text, namely 'The door type is not known' (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "door",
|
||||
"description": "Layer 'Entrance' shows door=hinged with a fixed text, namely 'A classical, hinged door supported by joints' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "hinged"
|
||||
},
|
||||
{
|
||||
"key": "door",
|
||||
"description": "Layer 'Entrance' shows door=revolving with a fixed text, namely 'A revolving door which hangs on a central shaft, rotating within a cylindrical enclosure' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "revolving"
|
||||
},
|
||||
{
|
||||
"key": "door",
|
||||
"description": "Layer 'Entrance' shows door=sliding with a fixed text, namely 'A sliding door where the door slides sidewards, typically parallel with a wall' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "sliding"
|
||||
},
|
||||
{
|
||||
"key": "door",
|
||||
"description": "Layer 'Entrance' shows door=overhead with a fixed text, namely 'A door which rolls from overhead, typically seen for garages' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "overhead"
|
||||
},
|
||||
{
|
||||
"key": "door",
|
||||
"description": "Layer 'Entrance' shows door=no with a fixed text, namely 'This is an entrance without a physical door' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=yes with a fixed text, namely 'This is an automatic door' (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=no with a fixed text, namely 'This door is <b>not</b> automated' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=motion with a fixed text, namely 'This door will open automatically when <b>motion</b> is detected' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "motion"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=floor with a fixed text, namely 'This door will open automatically when a <b>sensor in the floor</b> is triggered' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "floor"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=button with a fixed text, namely 'This door will open automatically when a <b>button is pressed</b>' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "button"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=slowdown_button with a fixed text, namely 'This door revolves automatically all the time, but has a <b>button to slow it down</b>, e.g. for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "slowdown_button"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=continuous with a fixed text, namely 'This door revolves automatically all the time' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "continuous"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=serviced_on_button_press with a fixed text, namely 'This door will be opened by staff when requested by <b>pressing a button</b>' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "serviced_on_button_press"
|
||||
},
|
||||
{
|
||||
"key": "automatic_door",
|
||||
"description": "Layer 'Entrance' shows automatic_door=serviced_on_request with a fixed text, namely 'This door will be opened by staff when requested' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Walls and buildings')",
|
||||
"value": "serviced_on_request"
|
||||
},
|
||||
{
|
||||
"key": "width",
|
||||
"description": "Layer 'Entrance' shows and asks freeform values for key 'width' (in the MapComplete.osm.be theme 'Walls and buildings')"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -4,13 +4,36 @@ Tags format
|
|||
When creating the `json` file describing your layer or theme, you'll have to add a few tags to describe what you want.
|
||||
This document gives an overview of what every expression means and how it behaves in edge cases.
|
||||
|
||||
If the schema-files note a type `string | AndOrTagConfigJson`, you can use one of these values.
|
||||
If the schema-files note a type [`TagConfigJson`](https://github.com/pietervdvn/MapComplete/blob/develop/Models/ThemeConfig/Json/TagConfigJson.ts), you can use one of these values.
|
||||
|
||||
In some cases, not every type of tags-filter can be used. For example, _rendering_ an option with a regex is
|
||||
fine (`"if": "brand~[Bb]randname", "then":" The brand is Brandname"`); but this regex can not be used to write a value
|
||||
into the database. The theme loader will however refuse to work with such inconsistencies and notify you of this while
|
||||
you are building your theme.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
This example shows the most common options on how to specify tags:
|
||||
|
||||
```json
|
||||
{
|
||||
"and": [
|
||||
"key=value",
|
||||
{
|
||||
"or": [
|
||||
"other_key=value",
|
||||
"other_key=some_other_value"
|
||||
]
|
||||
},
|
||||
"key_which_should_be_missing=",
|
||||
"key_which_should_have_a_value~*",
|
||||
"key~.*some_regex_a*_b+_[a-z]?",
|
||||
"height<1"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Strict equality
|
||||
---------------
|
||||
|
|
|
@ -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
1267
Docs/Tools/stats/stats.2022-6-02.json
Normal file
1267
Docs/Tools/stats/stats.2022-6-02.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