Merge pull request #961 from pietervdvn/feature/walls-and-buildings

Feature/walls and buildings
This commit is contained in:
Pieter Vander Vennet 2022-07-18 10:25:59 +02:00 committed by GitHub
commit c9c67936b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 92 additions and 2 deletions

View file

@ -0,0 +1,12 @@
[
{
"path": "walls_and_buildings.png",
"license": "CC0",
"authors": [
"OSM"
],
"sources": [
"https://wiki.openstreetmap.org/wiki/File:Barrier_fence_mapnik.png#file"
]
}
]

View file

@ -43,5 +43,32 @@
"render": "2"
}
}
],
"calculatedTags": [
"_entrance_properties=feat.overlapWith('entrance')?.map(e => e.feat.properties).filter(p => p !== undefined)",
"_entrance:id=feat.get('_entrance_properties')?.map(e => e.id)?.at(0)",
"_entrance:width=feat.get('_entrance_properties')?.map(e => e.width)"
],
"tagRenderings": [
{
"id": "_entrance:width",
"render": {
"en": "<a href ='#{_entrance:id} '>This door has a width of {canonical(_entrance:width)} meters </a>",
"nl": "<a href ='#{_entrance:id} '>Deze deur heeft een breedte van {canonical(_entrance:width)} meter </a>",
"de": "<a href ='#{_entrance:id} '>Diese Tür hat eine Durchgangsbreite von {canonical(_entrance:width)} Meter </a>",
"es": "<a href ='#{_entrance:id} '>Esta puerta tiene una ancho de {canonical(_entrance:width)} metros </a>"
},
"freeform": {
"key": "_entrance:width"
},
"mappings": [
{
"if": "_entrance:width=",
"then": {
"en": "This entrance has no width information"
}
}
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

View file

@ -4,7 +4,7 @@
"en": "OnWheels"
},
"description": {
"en": "On this map, publicly weelchair accessible places are shown and can be easily added"
"en": "On this map, publicly wheelchair accessible places are shown and can be easily added"
},
"maintainer": "MapComplete",
"icon": "./assets/themes/onwheels/crest.svg",
@ -27,9 +27,39 @@
"shops",
"toilet",
"viewpoint",
"doctors"
"doctors",
"walls_and_buildings"
],
"overrideAll": {
"+calculatedTags": [
"_poi_walls_and_buildings_entrance_properties=feat.closestn('walls_and_buildings', 1, undefined, 1000).map(w => ({id: w.feat.properties.id, width: w.feat.properties['_entrance:width']}))[0]",
"_poi_entrance:width=JSON.parse(feat.properties._poi_walls_and_buildings_entrance_properties)?.width"
],
"+tagRenderings": [
{
"id": "_poi_entrance:width",
"condition": "entrance=",
"render": {
"en": "This door has a width of {canonical(_poi_entrance:width)} meter",
"nl": "Deze deur heeft een breedte van {canonical(_poi_entrance:width)} meter",
"de": "Diese Tür hat eine Durchgangsbreite von {canonical(_poi_entrance:width)} Meter",
"es": "Esta puerta tiene una ancho de {canonical(_poi_entrance:width)} metros"
},
"freeform": {
"key": "_poi_entrance:width",
"type": "distance"
},
"mappings": [
{
"if": "_poi_entrance:width=",
"then": {
"en": "This entrance has no width information"
}
}
]
}
],
"minzoom": "15",
"mapRendering": [
{

View file

@ -0,0 +1,21 @@
{
"id": "walls_and_buildings",
"title": {
"en": "Walls and buildings"
},
"description": {
"en": "Special builtin layer providing all walls and buildings. This layer is useful in presets for objects which can be placed against walls (e.g. AEDs, postboxes, entrances, addresses, surveillance cameras, …). This layer is invisible by default and not toggleable by the user."
},
"maintainer": "MapComplete",
"icon": "./assets/layers/walls_and_buildings/walls_and_buildings.png",
"version": "0",
"startLat": 50.8465573,
"defaultBackgroundId": "CartoDB.Voyager",
"startLon": 4.351697,
"startZoom": 16,
"widenFactor": 2,
"layers": [
"walls_and_buildings",
"entrance"
]
}