forked from MapComplete/MapComplete
Add multi-apply box/feature, use it in etymology-theme to apply tags onto all segments of the same street
This commit is contained in:
parent
d0dfe9f607
commit
d3550fefbe
22 changed files with 355 additions and 78 deletions
|
|
@ -28,6 +28,15 @@ The latitude and longitude of the point (or centerpoint in the case of a way/are
|
|||
|
||||
|
||||
|
||||
### _layer
|
||||
|
||||
|
||||
|
||||
The layer-id to which this feature belongs. Note that this might be return any applicable if `passAllFeatures` is defined.
|
||||
|
||||
|
||||
|
||||
|
||||
### _surface, _surface:ha
|
||||
|
||||
|
||||
|
|
@ -173,7 +182,7 @@ For example to get all objects which overlap or embed from a layer, use `_contai
|
|||
|
||||
Given either a list of geojson features or a single layer name, gives the single object which is nearest to the feature. In the case of ways/polygons, only the centerpoint is considered. Returns a single geojson feature or undefined if nothing is found (or not yet laoded)
|
||||
|
||||
0. list of features
|
||||
0. list of features or a layer name or '*' to get all features
|
||||
|
||||
### closestn
|
||||
|
||||
|
|
@ -181,7 +190,7 @@ For example to get all objects which overlap or embed from a layer, use `_contai
|
|||
|
||||
If a 'unique tag key' is given, the tag with this key will only appear once (e.g. if 'name' is given, all features will have a different name)
|
||||
|
||||
0. list of features or layer name
|
||||
0. list of features or layer name or '*' to get all features
|
||||
1. amount of features
|
||||
2. unique tag key (optional)
|
||||
3. maxDistanceInMeters (optional)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ A geographical length in meters (rounded at two points). Will give an extra mini
|
|||
|
||||
## wikidata
|
||||
|
||||
A wikidata identifier, e.g. Q42
|
||||
A wikidata identifier, e.g. Q42. Input helper arguments: [ key: the value of this tag will initialize search (default: name), options: { removePrefixes: string[], removePostfixes: string[] } these prefixes and postfixes will be removed from the initial search value]
|
||||
|
||||
## int
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
image key/prefix | image | The keys given to the images, e.g. if <span class='literal-code'>image</span> is given, the first picture URL will be added as <span class='literal-code'>image</span>, the second as <span class='literal-code'>image:0</span>, the third as <span class='literal-code'>image:1</span>, etc...
|
||||
image key/prefix (multiple values allowed if comma-seperated) | image | The keys given to the images, e.g. if <span class='literal-code'>image</span> is given, the first picture URL will be added as <span class='literal-code'>image</span>, the second as <span class='literal-code'>image:0</span>, the third as <span class='literal-code'>image:1</span>, etc...
|
||||
|
||||
#### Example usage
|
||||
|
||||
|
|
@ -26,10 +26,11 @@ image key/prefix | image | The keys given to the images, e.g. if <span class='li
|
|||
name | default | description
|
||||
------ | --------- | -------------
|
||||
image-key | image | Image tag to add the URL to (or image-tag:0, image-tag:1 when multiple images are added)
|
||||
label | Add image | The text to show on the button
|
||||
|
||||
#### Example usage
|
||||
|
||||
`{image_upload(image)}`
|
||||
`{image_upload(image,Add image)}`
|
||||
### wikipedia
|
||||
|
||||
A box showing the corresponding wikipedia article - based on the wikidata tag
|
||||
|
|
@ -154,4 +155,19 @@ minzoom | 18 | How far the contributor must zoom in before being able to import
|
|||
|
||||
#### Example usage
|
||||
|
||||
`{import_button(,Import this data into OpenStreetMap,./assets/svg/addSmall.svg,18)}` Generated from UI/SpecialVisualisations.ts
|
||||
`{import_button(,Import this data into OpenStreetMap,./assets/svg/addSmall.svg,18)}`
|
||||
### multi_apply
|
||||
|
||||
A button to apply the tagging of this object onto a list of other features. This is an advanced feature for which you'll need calculatedTags
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
feature_ids | undefined | A JSOn-serialized list of IDs of features to apply the tagging on
|
||||
keys | undefined | One key (or multiple keys, seperated by ';') of the attribute that should be copied onto the other features.
|
||||
text | undefined | The text to show on the button
|
||||
autoapply | undefined | A boolean indicating wether this tagging should be applied automatically if the relevant tags on this object are changed. A visual element indicating the multi_apply is still shown
|
||||
overwrite | undefined | If set to 'true', the tags on the other objects will always be overwritten. The default behaviour will be to only change the tags on other objects if they are either undefined or had the same value before the change
|
||||
|
||||
#### Example usage
|
||||
|
||||
{multi_apply(_features_with_the_same_name_within_100m, name:etymology:wikidata;name:etymology, Apply etymology information on all nearby objects with the same name)} Generated from UI/SpecialVisualisations.ts
|
||||
|
|
@ -497,6 +497,15 @@
|
|||
"key": "description:0",
|
||||
"description": "Layer 'Natuurgebied' shows and asks freeform values for key 'description:0' (in the MapComplete.osm.be theme 'De Natuur in')"
|
||||
},
|
||||
{
|
||||
"key": "wikidata",
|
||||
"description": "Layer 'Natuurgebied' shows and asks freeform values for key 'wikidata' (in the MapComplete.osm.be theme 'De Natuur in')"
|
||||
},
|
||||
{
|
||||
"key": "wikidata",
|
||||
"description": "Layer 'Natuurgebied' shows wikidata= with a fixed text, namely 'No Wikipedia page has been linked yet' (in the MapComplete.osm.be theme 'De Natuur in') Picking this answer will delete the key wikidata.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "service:bicycle:cleaning:charge",
|
||||
"description": "Layer 'Natuurgebied' shows and asks freeform values for key 'service:bicycle:cleaning:charge' (in the MapComplete.osm.be theme 'De Natuur in')"
|
||||
|
|
|
|||
|
|
@ -105,6 +105,15 @@
|
|||
"key": "wheelchair",
|
||||
"description": "Layer 'Observation towers' shows wheelchair=no with a fixed text, namely 'This place is not reachable with a wheelchair' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Observation towers')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "wikidata",
|
||||
"description": "Layer 'Observation towers' shows and asks freeform values for key 'wikidata' (in the MapComplete.osm.be theme 'Observation towers')"
|
||||
},
|
||||
{
|
||||
"key": "wikidata",
|
||||
"description": "Layer 'Observation towers' shows wikidata= with a fixed text, namely 'No Wikipedia page has been linked yet' (in the MapComplete.osm.be theme 'Observation towers') Picking this answer will delete the key wikidata.",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue