Merge pull request #961 from pietervdvn/feature/walls-and-buildings
Feature/walls and buildings
This commit is contained in:
commit
c9c67936b8
5 changed files with 92 additions and 2 deletions
12
assets/layers/walls_and_buildings/license_info.json
Normal file
12
assets/layers/walls_and_buildings/license_info.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
|
@ -43,5 +43,32 @@
|
||||||
"render": "2"
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
BIN
assets/layers/walls_and_buildings/walls_and_buildings.png
Normal file
BIN
assets/layers/walls_and_buildings/walls_and_buildings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 342 B |
|
@ -4,7 +4,7 @@
|
||||||
"en": "OnWheels"
|
"en": "OnWheels"
|
||||||
},
|
},
|
||||||
"description": {
|
"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",
|
"maintainer": "MapComplete",
|
||||||
"icon": "./assets/themes/onwheels/crest.svg",
|
"icon": "./assets/themes/onwheels/crest.svg",
|
||||||
|
@ -27,9 +27,39 @@
|
||||||
"shops",
|
"shops",
|
||||||
"toilet",
|
"toilet",
|
||||||
"viewpoint",
|
"viewpoint",
|
||||||
"doctors"
|
"doctors",
|
||||||
|
"walls_and_buildings"
|
||||||
],
|
],
|
||||||
"overrideAll": {
|
"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",
|
"minzoom": "15",
|
||||||
"mapRendering": [
|
"mapRendering": [
|
||||||
{
|
{
|
||||||
|
|
21
assets/themes/walls_and_buildings/walls_and_buildings.json
Normal file
21
assets/themes/walls_and_buildings/walls_and_buildings.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue