• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Rapid transit OSM map/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Rapid transit OSM map
This is the template sandbox page for Template:Rapid transit OSM map (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]

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.

Contents

  • 1 Usage
  • 2 Examples
    • 2.1 Rapid transit system
      • 2.1.1 Frankfurt
      • 2.1.2 Moscow
    • 2.2 A specific line of a system
    • 2.3 Rapid transit network of a region
  • 3 See also

Usage

edit
{{Rapid transit OSM map
| 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. -->
}}

Examples

edit

Rapid transit system

edit

Frankfurt

edit
Map
Frankfurt

Moscow

edit
Map
Moscow

A specific line of a system

edit
Map
Zurich S6

Rapid transit network of a region

edit
Map
Athens

See also

edit
  • Help:Extension:Kartographer
  • Icons
The above documentation is transcluded from Template:Rapid transit OSM map/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Rapid_transit_OSM_map/sandbox&oldid=1160783676"
Last edited on 18 June 2023, at 19:17

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 18 June 2023, at 19:17 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop