forked from MapComplete/MapComplete
First version of transit/bus theme
This commit is contained in:
parent
f9e68f5710
commit
b4052b8f63
12 changed files with 788 additions and 22 deletions
3
assets/layers/transit_stops/bus_stop.svg
Normal file
3
assets/layers/transit_stops/bus_stop.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
|
||||
<path d="M 2,0 1,1 v 8 h 0.65625 c 0,0 0.1011489,1 0.81275,1 C 3.1581295,10 3.25,9 3.25,9 h 3.5 c 0,0 0.1143421,1 0.781,1 0.8164686,0 0.81275,-1 0.81275,-1 H 9 V 1 L 8,0 Z M 3,1 H 7 V 2 H 3 Z M 2,3 H 8 V 6 H 2 Z M 2,7 H 3 V 8 H 2 Z M 7,7 H 8 V 8 H 7 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 348 B |
15
assets/layers/transit_stops/license_info.json
Normal file
15
assets/layers/transit_stops/license_info.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"path": "bus_stop.svg",
|
||||
"license": "CC0",
|
||||
"authors": [
|
||||
"Andy Allan",
|
||||
"Michael Glanznig",
|
||||
"Paul Norman",
|
||||
"Paul Dicker"
|
||||
],
|
||||
"sources": [
|
||||
"https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/highway/bus_stop.svg"
|
||||
]
|
||||
}
|
||||
]
|
260
assets/layers/transit_stops/transit_stops.json
Normal file
260
assets/layers/transit_stops/transit_stops.json
Normal file
|
@ -0,0 +1,260 @@
|
|||
{
|
||||
"id": "transit_stops",
|
||||
"name": {
|
||||
"en": "Transit Stops"
|
||||
},
|
||||
"description": {
|
||||
"en": "Layer showing different types of transit stops."
|
||||
},
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"or": [
|
||||
"highway=bus_stop"
|
||||
]
|
||||
}
|
||||
},
|
||||
"minzoom": 15,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Transit Stop"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "name~*",
|
||||
"then": {
|
||||
"en": "Stop {name}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"mapRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"icon": {
|
||||
"render": "./assets/layers/transit_stops/bus_stop.svg",
|
||||
"mappings": []
|
||||
},
|
||||
"label": "<div style=\"background: white; display: block\">{name}</div>"
|
||||
}
|
||||
],
|
||||
"calculatedTags": [
|
||||
"_routes=feat.memberships()",
|
||||
"_contained_routes_properties=feat.memberships().map(p => {return {id: p.relation.id, name: p.relation.properties.name} }).filter((v,i,a)=>a.findIndex(t=>(JSON.stringify(t) === JSON.stringify(v)))===i)",
|
||||
"_contained_route_ids=JSON.parse(feat.properties._contained_routes_properties ?? '[]').map(p => p.id)",
|
||||
"_contained_routes=JSON.parse(feat.properties._contained_routes_properties ?? '[]').map(p => `<li><a href='#relation/${p.id}'>${p.name ?? 'bus route'}</a></li>`).join('')",
|
||||
"_contained_routes_count=JSON.parse(feat.properties._contained_routes_properties ?? '[]').length"
|
||||
],
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "stop_name",
|
||||
"render": {
|
||||
"en": "This stop is called <b>{name}</b>"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "name",
|
||||
"type": "string",
|
||||
"addExtraTags": [
|
||||
"noname="
|
||||
],
|
||||
"placeholder": {
|
||||
"en": "Name of the stop"
|
||||
}
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"noname=yes",
|
||||
"name="
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"en": "This stop has no name"
|
||||
}
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "What is the name of this stop?"
|
||||
},
|
||||
"placeholder": "Name of the stop"
|
||||
},
|
||||
"images",
|
||||
{
|
||||
"id": "shelter",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "shelter=yes",
|
||||
"then": {
|
||||
"en": "This stop has a shelter"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "shelter=no",
|
||||
"then": {
|
||||
"en": "This stop does not have a shelter"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "shelter=separate",
|
||||
"then": {
|
||||
"en": "This stop has a shelter, that's separately mapped"
|
||||
},
|
||||
"hideInAnswer": true
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Does this stop have a shelter?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bench",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "bench=yes",
|
||||
"then": {
|
||||
"en": "This stop has a bench"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "bench=no",
|
||||
"then": {
|
||||
"en": "This stop does not have a bench"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "bench=separate",
|
||||
"then": {
|
||||
"en": "This stop has a bench, that's separately mapped"
|
||||
},
|
||||
"hideInAnswer": true
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Does this stop have a bench?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bin",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "bin=yes",
|
||||
"then": {
|
||||
"en": "This stop has a bin"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "bin=no",
|
||||
"then": {
|
||||
"en": "This stop does not have a bin"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "bin=separate",
|
||||
"then": {
|
||||
"en": "This stop has a bin, that's separately mapped"
|
||||
},
|
||||
"hideInAnswer": true
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Does this stop have a bin?"
|
||||
}
|
||||
},
|
||||
"wheelchair-access",
|
||||
{
|
||||
"id": "tactile_paving",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "tactile_paving=yes",
|
||||
"then": {
|
||||
"en": "This stop has tactile paving"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "tactile_paving=no",
|
||||
"then": {
|
||||
"en": "This stop does not have tactile paving"
|
||||
}
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Does this stop have tactile paving?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "lit",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "lit=yes",
|
||||
"then": {
|
||||
"en": "This stop is lit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "lit=no",
|
||||
"then": {
|
||||
"en": "This stop is not lit"
|
||||
}
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Is this stop lit?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "departures_board",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "departures_board=yes",
|
||||
"then": {
|
||||
"en": "This stop has a departures board of unknown type"
|
||||
},
|
||||
"hideInAnswer": true
|
||||
},
|
||||
{
|
||||
"if": "departures_board=realtime",
|
||||
"then": {
|
||||
"en": "This stop has a board showing realtime departure information"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "passenger_information_display=yes",
|
||||
"then": {
|
||||
"en": "This stop has a board showing realtime departure information"
|
||||
},
|
||||
"hideInAnswer": true
|
||||
},
|
||||
{
|
||||
"if": "departures_board=timetable",
|
||||
"then": {
|
||||
"en": "This stop has a timetable showing regular departures"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "departures_board=interval",
|
||||
"then": {
|
||||
"en": "This stop has a timetable containing just the interval between departures"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "departures_board=no",
|
||||
"then": {
|
||||
"en": "This stop does not have a departures board"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"render": {
|
||||
"en": "<h3>{_contained_routes_count} routes stop at this stop</h3> <ul>{_contained_routes}</ul>"
|
||||
},
|
||||
"condition": "_contained_routes~*",
|
||||
"id": "contained_routes"
|
||||
}
|
||||
],
|
||||
"filter": [],
|
||||
"allowMove": false
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue