Difference between revisions of "Template:Maplink-road/doc"

From blackwiki
Jump to navigation Jump to search
imported>Cobaltcigs
imported>BMACS1002
 
Line 2: Line 2:
 
<includeonly>{{template shortcut|Maplink-road}}</includeonly>
 
<includeonly>{{template shortcut|Maplink-road}}</includeonly>
 
{{main|Template:Maplink/doc}}
 
{{main|Template:Maplink/doc}}
This template was created to provide a reduced parameter set and standardized appearance for [[Template:Maplink]] when used in [[Template:Infobox road]]. Namely the parameters <code> frame = yes | frame-width = 290 | frame-align = center | plain = yes | type = line | stroke-width = 2</code> are assumed.
+
This template was created to provide a reduced parameter set and standardized appearance for [[Template:Maplink]] when used in [[Template:Infobox road]]. Namely the parameters <code> frame = yes | frame-width = 290 | frame-align = center | plain = yes | type = line | stroke-width = 2</code> are assumed. By use of the [[Module:Template wrapper|Template wrapper module]], these default parameters can be modified to suit specific needs, and additional parameters that are valid in Maplink can be included, such as <code>title</code>, <code>description</code>, <code>stroke-color</code>, etc.
  
 
==Parameters==
 
==Parameters==

Latest revision as of 16:37, 3 March 2021

This template was created to provide a reduced parameter set and standardized appearance for Template:Maplink when used in Template:Infobox road. Namely the parameters frame = yes | frame-width = 290 | frame-align = center | plain = yes | type = line | stroke-width = 2 are assumed. By use of the Template wrapper module, these default parameters can be modified to suit specific needs, and additional parameters that are valid in Maplink can be included, such as title, description, stroke-color, etc.

Parameters

Name Position Notes
zoom 1 forwards to {{maplink|zoom=\d+}} These parameters are intentionally in the same order that they appear at the end of OpenStreetMap urls, to ease conversion of anchors such as #map=13/30.2795/-97.7515 to the form {{maplink|13|30.2795|-97.7515}}. Some way to extract all three values from a single parameter with slashes would be good too.
lat 2 forwards to {{maplink|frame-lat=\-?\d+(?:\.\d+)?}}
long 3 forwards to {{maplink|frame-long=\-?\d+(?:\.\d+)?}}
id 4 the Wikidata id is optional as the template can determine this from the page on which it is being used.