Small refactoring, add 'last edit by'-rendering

This commit is contained in:
Pieter Vander Vennet 2021-04-21 01:26:36 +02:00
parent c6b4ba43fb
commit 95f1bdd797
10 changed files with 76 additions and 29 deletions

View file

@ -77,5 +77,10 @@
"key": "opening_hours",
"type": "opening_hours"
}
},
"last_edit": {
"#": "Gives some metainfo about the last edit and who did edit it - rendering only",
"#condition": "_last_edit:contributor~*",
"render": "<div class='subtle' style='font-size: small'><a href='https://www.openStreetMap.org/changeset/{_last_edit:changeset}' target='_blank'>Last edited on {_last_edit:timestamp}</a> by <a href='https://www.openStreetMap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a></div>"
}
}

View file

@ -15,7 +15,7 @@
"maintainer": "MapComplete",
"icon": "./assets/layers/play_forest/icon.svg",
"hideFromOverview": true,
"lockLocation": false,
"lockLocation": true,
"version": "0",
"startLat": 51.17174,
"startLon": 4.449462,
@ -27,7 +27,8 @@
"play_forest",
"playground",
"sport_pitch",
{ "builtin": "slow_roads",
{
"builtin": "slow_roads",
"override": {
"calculatedTags": [
"_part_of_walking_routes=feat.memberships().map(r => \"<a href='#relation/\"+r.relation.id+\"'>\" + r.relation.tags.name + \"</a>\").join(', ')"
@ -109,7 +110,7 @@
"nl": "Wie beheert deze wandeling en plaatst dus de signalisatiebordjes?"
},
"render": "Signalisatie geplaatst door {operator}",
"freeform":{
"freeform": {
"key": "operator"
}
},
@ -130,7 +131,7 @@
],
"color": {
"render": "#6d6",
"mappings":[
"mappings": [
{
"if": "color~*",
"then": "{color}"
@ -140,8 +141,16 @@
"width": {
"render": "3"
}
},
{
"source": {
"osmTags": {
"or": []
},
"geoJson": "https://pietervdvn.github.io/speelplekken-cache.geojson"
},
"passAllFeatures": true
}
],
"roamingRenderings": [
{