Basic station map

This commit is contained in:
Robin van der Linde 2022-09-12 10:33:52 +02:00
parent c8475068d0
commit cf91e4fe54
Signed by: Robin-van-der-Linde
GPG key ID: 53956B3252478F0D
5 changed files with 370 additions and 0 deletions

View file

@ -0,0 +1,69 @@
{
"id": "railway_platforms",
"name": {
"en": "Railway Platforms"
},
"description": {
"en": "Find every platform in the station, and the train routes that use them."
},
"title": {
"render": {
"en": "Platform"
},
"mappings": [
{
"if": "ref~*",
"then": {
"en": "Platform {ref}"
}
}
]
},
"source": {
"osmTags": {
"or": [
"railway=platform"
]
}
},
"minzoom": 18,
"tagRenderings": [
{
"id": "ref",
"question": {
"en": "What is the number for this platform?"
},
"freeform": {
"key": "ref",
"type": "string",
"placeholder": {
"en": "Platform number"
}
},
"render": {
"en": "Platform {ref}"
}
},
"level"
],
"mapRendering": [
{
"color": "gray"
},
{
"icon": "./assets/svg/bug.svg",
"location": [
"point",
"centroid"
],
"label": {
"mappings": [
{
"if": "ref~*",
"then": "<div style='background: white; padding: 0.25em; border-radius:0.5em'>{ref}</div>"
}
]
}
}
]
}

View file

@ -0,0 +1,22 @@
[
{
"path": "public_transport_tickets.svg",
"license": "CC0",
"authors": [
"Jérémy Ragusa"
],
"sources": [
"https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/amenity/public_transport_tickets.svg"
]
},
{
"path": "rail-light-15.svg",
"license": "CC0",
"authors": [
"Maki"
],
"sources": [
"https://labs.mapbox.com/maki-icons/"
]
}
]

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
<path d="m0,0 v3 h1 v-2 h12 v2 h1 v-3 z m3,2 v12 h3 v-1 a1,1 0 0 1 2,0 v1 h3 v-12 h-1 v6 h-6 v-6 z m1,7 h6 v4 h-1 a2,2 0 0 0 -4,0 h-1 z"/>
</svg>

After

Width:  |  Height:  |  Size: 232 B

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1"
id="svg4619" inkscape:version="0.91+devel+osxmenu r12911" sodipodi:docname="rail-light-15.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="15px" height="15px"
viewBox="0 0 15 15" style="enable-background:new 0 0 15 15;" xml:space="preserve">
<path id="path14245" d="M5.5,0C5,0,5,0.5,5,0.5v1C5,1.777,5.223,2,5.5,2S6,1.777,6,1.5V1h1v2H6c0,0-2,0-2,2v3c0,3,3,3,3,3h1
c0,0,3,0,3-3V5c0-2-2-2-2-2H8V1h1v0.5C9,1.777,9.223,2,9.5,2S10,1.777,10,1.5v-1C10,0,9.5,0,9.5,0H5.5z M7.5,4l2.0449,0.7734L10,6.5
C10.1316,7,9.5,7,9.5,7h-4c0,0-0.6316,0-0.5-0.5l0.4551-1.7266L7.5,4z M7.5,8C7.7761,8,8,8.2239,8,8.5S7.7761,9,7.5,9
S7,8.7761,7,8.5S7.2239,8,7.5,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,264 @@
{
"id": "stations",
"title": {
"en": "Train Stations"
},
"description": {
"en": "View, edit and add details to a train station"
},
"icon": "./assets/themes/stations/rail-light-15.svg",
"startLat": 0,
"startLon": 0,
"startZoom": 0,
"hideFromOverview": true,
"defaultBackgroundId": "CartoDB.Positron",
"layers": [
{
"builtin": "indoors",
"override": {
"minzoom": 19,
"passAllFeatures": true,
"mapRendering": [
{
"label": {
"render": null
},
"iconSize": "0,0,bottom"
}
]
}
},
{
"builtin": [
"entrance",
"elevator",
"bench",
"toilet",
"waste_basket"
],
"override": {
"minzoom": 19
}
},
{
"builtin": "pedestrian_path",
"override": {
"mapRendering": [
{},
{
"color": {
"render": "#b33",
"mappings": [
{
"if": "highway=steps",
"then": "gray"
}
]
},
"width": {
"render": 4,
"mappings": [
{
"if": "highway=steps",
"then": 10
}
]
},
"dashArray": {
"render": "12 6",
"mappings": [
{
"if": "highway=steps",
"then": "2 2"
}
]
}
}
],
"minzoom": 19
}
},
{
"id": "train_station",
"minzoom": 12,
"minzoomVisible": 17,
"source": {
"osmTags": {
"or": [
"railway=station",
"railway=halt"
]
}
},
"mapRendering": [
{
"icon": "./assets/themes/stations/rail-light-15.svg",
"location": [
"point",
"centroid"
],
"label": {
"mappings": [
{
"if": "name~*",
"then": "<div style='background: white; padding: 0.25em; border-radius:0.5em'>{name}</div>"
}
]
}
},
{
"color": "green"
}
]
},
{
"builtin": "shops",
"override": {
"source": {
"osmTags": {
"and": [
"shop~*",
"indoor=room"
]
}
},
"presets": null,
"minzoom": 19
}
},
"railway_platforms",
{
"id": "ticket_machine",
"source": {
"osmTags": {
"and": [
"amenity=vending_machine",
"vending=public_transport_tickets"
]
}
},
"title": {
"render": {
"en": "Ticket Machine"
}
},
"tagRenderings": [
"images",
"level",
{
"id": "operator",
"question": {
"en": "Who is the operator of this ticket machine?"
},
"render": {
"en": "This ticket machine is operated by {operator}"
},
"freeform": {
"key": "operator",
"type": "string",
"placeholder": {
"en": "Name of the operator"
}
}
}
],
"presets": [
{
"tags": ["amenity=vending_machine", "vending=public_transport_tickets"],
"title": {
"en": "a ticket machine"
}
}
],
"mapRendering": [
{
"icon": "circle:white;./assets/themes/stations/public_transport_tickets.svg",
"iconSize": "20,20,center",
"location": [
"point",
"centroid"
]
}
]
},
{
"id": "departures_board",
"name": {
"en": "Departures boards"
},
"description": {
"en": "Displays showing the trains that will leave from this station"
},
"title": {
"render": {
"en": "Departures board"
}
},
"minzoom": 19,
"source": {
"osmTags": {
"and": [
"departures_board~*",
"departures_board!=no",
"public_transport="
]
}
},
"tagRenderings": [
{
"id": "type",
"question": {
"en": "What kind of departures board is this?"
},
"mappings": [
{
"if": "departures_board=yes",
"then": {
"en": "This is a departures board of an unknown type"
}
},
{
"if": "departures_board=realtime",
"then": {
"en": "This is an electronic board, showing the next departures in realtime"
}
},
{
"if": "departures_board=timetable",
"then": {
"en": "This is a paper timetable"
}
},
{
"if": "departures_board=delay",
"then": {
"en": "There is a sign showing the frequency of the trains"
}
}
]
},
"level"
],
"presets": [
{
"tags": ["departures_board=yes"],
"title": {
"en": "a departures board"
},
"description": {
"en": "Add a board showing departures, either electronic or paper"
}
}
],
"mapRendering": [
{
"icon": "./assets/svg/bug.svg",
"location": [
"point",
"centroid"
]
}
]
}
]
}