User:One of Many Tims/sandbox
From Wikipedia, the free encyclopedia
Proposed changes to Template:Rapid transit OSM map
The template generally works if the lines that make up the system have their own Wikidata entries (e.g. S6 (Q7388350) for Zürich S-Bahn), and the entries are connected to an OpenStreetMap line child feature.
Each Wikidata line entity's state of use (P5817) should be in use (Q55654238) and should include the transport network (P16) property (for instance on the S6 (Q7388350) entity, transport network (P16) -> Zürich S-Bahn (Q636091)).
This is a wrapper for Template:Maplink. It fetches `geoline` features and shows them within the template. The template works through a SPARQL Wikidata query. The vital field is `system_qid`, which determines the central item from which all other data is pulled.
First, try this on the Wikipedia page of an item that is supposed to show up on the map (e.g. a metro line):
{{mapframe|frame = yes | type = line | stroke-width = 2}}
If it's not displayed, the item might not yet be linked to an OSM feature.
Usage
{{Rapid transit OSM map/Sandbox
| system_qid = <!-- Optional. By default It'll assume the wikidata id linked to the page it is being used on. -->
| system_qid[2-5] = <!-- use upto 4 additional systems -->
| frame-lat =
| frame-long =
| frame-width =
| frame-height =
| frame-align =
| stroke-width = <!-- Default is 3, use 2 for dense networks -->
| plain =
| text =
| zoom =
| display =
| single_line = <!-- Useful to show a specific transit line. See examples below -->
| stations = <!-- Any value will show the stations of a line/system. -->
| stations_qid = <!-- Optional. By default It'll assume the wikidata id linked to the page it is being used on. -->
|rail-colour=<!-- Optional. Use this hex colo(u)r instead of the official Wikidata colour without the #. Eg 000000 for black -->
| marker-symbol = <!-- If stations is set; Default is rail-metro -->
| marker-colo(u)r = <!-- If stations is set. -->
| marker-size = <!-- If stations is set; Default is medium. -->
}}
Typical marker-symbols
Examples
Rapid transit system
Frankfurt
{{Rapid transit OSM map/Sandbox
| system_qid = Q705684
| frame-width = 500
| frame-height = 440
| zoom = 10
| text = Frankfurt
| plain = no
}}
|
Moscow
{{Rapid transit OSM map/Sandbox
| system_qid = Q5499
| frame-lat = 55.75
| frame-long = 37.6
| frame-width = 500
| frame-height = 440
| text = Moscow
| plain = no
}}
|
A specific line of a system
{{Rapid transit OSM map/Sandbox
| system_qid = Q7388350 <!-- not needed as the template can determine this from the page it is being used on. -->
| frame-lat = 47.34
| frame-long = 8.57
| frame-width = 400
| frame-height = 440
| zoom = 11
| stations = y
| stations_qid = Q7388350 <!-- not needed as the template can determine this from the page it is being used on. -->
| single_line = y
| text = Zurich S6
| plain = no
}}
|}
|
New test case: specific line of a system, stations are still in use but no longer servicing that line
{{Rapid transit OSM map/Sandbox
| system_qid = Q392496
| stations_qid = Q3239152
| stations = y
| zoom = 11
| frame-width = 400
| frame-height = 600
| frame-lat = 45.618406
| frame-long = -73.596458
}}
|}
|
New test case: REM
New test case: specific line of a system, stations has other lines no longer in use
(This line sharse a station with the line above, but the former no longer services it)
{{Rapid transit OSM map/Sandbox
| system_qid = Q392496
| stations_qid = Q3239159
| stations = y
| zoom = 10
| frame-width = 500
| frame-height = 400
| frame-lat = 45.512117
| frame-long = -73.373222
}}
|}
|
Rapid transit network of a region
{{Rapid transit OSM map/Sandbox
| system_qid = Q1814382
| frame-lat = 37.99
| frame-long = 23.73
| frame-width = 500
| frame-height = 440
| zoom = 10
| text = Athens
| plain = no
}}
|
See also
Proposed changes to Template:Rail-interchange and Template:Rail-interchange/doc/CA
Laval
Longueuil
Montréal
{{rint|montreal|exo}}or{{…|montreal|rail}}- optional 3rd argument (route name) displays a colour box and a link to that route:
{{rint|montreal|exo|11}}or{{…|exo|Vaudreuil-Hudson}}
{{rint|montreal|exo|12}}or{{…|exo|Saint-Jérôme}}
{{rint|montreal|exo|13}}or{{…|exo|Mont-Saint-Hilaire}}
{{rint|montreal|exo|14}}or{{…|exo|Candiac}}
{{rint|montreal|exo|15}}or{{…|exo|Mascouche}}
- optional 3rd argument for specific modes:
{{rint|montreal|metro}}- optional 3rd argument changes to a colour box with the line number (1, 2, 4 or 5) and a link to that line:
{{rint|montreal|rem}}- optional 3rd argument for line or terminus icons:
{{rint|montreal|bus}}- Proposed to add:optional 3rd argument adds a box with the route number and a link to that route:
101 {{rint/sandbox|montreal|bus|101}}etc. - optional 3rd and 4th argument for specific services:
- Proposed remove, will show as 'bus' for backward compatibility
{{rint|montreal|bus|navetteor}}
{{rint|montreal|bus|night}}- Proposed to add:
301 ☾ {{rint/sandbox|montreal|bus|night|301}} - Proposed to add:

{{rint/sandbox|montreal|bus|all-day high-frequency}} - Proposed to add:
121 {{rint/sandbox|montreal|bus|all-day high-frequency|121}} - Proposed to add:
{{rint/sandbox|montreal|bus|rush-hour high-frequency}} - Proposed to add:
174 {{rint/sandbox|montreal|bus|rush-hour high-frequency|174}} - Proposed to add:
{{rint/sandbox|montreal|taxibus}} - Proposed to add:
174 {{rint/sandbox|montreal|taxibus|174}} - Proposed remove, will show as 'bus' for backward compatibility
{{rint|montreal|bus|express}} - Proposed remove, will show as 'bus' for backward compatibility
{{rint|montreal|bus|shuttle}}
Using the Module:Adjacent stations/Société de transport de Montréal
| code | result |
|---|---|
{{ric|Société de transport de Montréal|taxibus|size=20px}} |
|
{{ric|Société de transport de Montréal|bus|size=20px}} |
|
{{rcb|Société de transport de Montréal|bus|inline=route}} |
STM |
{{rbox|121||#{{rcr|Société de transport de Montréal|all-day high-frequency}}|#fff}} |
121 |
{{rbox|174||#{{rcr|Société de transport de Montréal|rush-hour high-frequency}}|#{{rcr|Société de transport de Montréal/sandbox|all-day high-frequency}}|border=#{{rcr|Société de transport de Montréal|all-day high-frequency}}}} |
174 |
{{rbox|378 {{emoji presentation|☾|text}}||#{{rcr|Société de transport de Montréal|night}}|#fff}} |
378 ☾︎ |
{{rbox|747 {{emoji presentation|✈|text}}||#{{rcr|Société de transport de Montréal|747}}|#fff}} |
747 ✈︎ |
{{ric|Société de transport de Montréal|night}} |
|
{{ric|Société de transport de Montréal|all-day high-frequency}} |
|
{{ric|Société de transport de Montréal|rush-hour high-frequency}} |
|
Using Template:Rail-interchange/sandbox
Just the night icon:
What happens if I specify an icon size: ![]()
Using Module:Adjacent stations/Canada transit for RTL and STL
| code | result |
|---|---|
{{ric|Canada transit|RTL|size=20px}} |
|
{{rcb|Canada transit|RTL|inline=route}} |
RTL |
{{rbox|5||#{{rcr|Canada transit|RTL}}|#fff}} |
5 |
{{rbox|9 {{emoji presentation|♿|text}}||#{{rcr|Canada transit|RTL}}|#fff}} |
9 ♿︎ |
{{rint/sandbox|longueuil|bus|8|accessible}} |
|
{{ric|Canada transit|STL|size=20px}} |
|
{{rcb|Canada transit|STL|inline=route}} |
STL |
{{rbox|T23||#{{rcr|Canada transit|STL}}|#fff}} |
T23 |
{{rbox|39||#{{rcr|Canada transit|STL}}|#fff}} |
39 |
Test REM icon in dark mode
Montreal bus route box tests
STM
121
174
121
378 ☾︎
747 ✈︎
Exo, using RouteBox and Module:Adjacent stations/Exo/sandbox:
Testing with rint:
Testing with rint: ![]()
Testing with rint:
Testing with rint: ![]()
Testing with rint:
111
Testing with rint:
111x
Testing with rint:
111r
Testing with rint:
111d
Exo 481
680
380
Exo, using Color box and Module:Adjacent stations/Exo/sandbox:
Exo
481
680
380
Attempts to create unicode versions of symbols:
- Express like so »⃝{U+|20DD}}
- Regional like so: ↔⃝U+20DD
- On demand like so:






