Template:OSMLink

Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:OSMLink/doc.

A template to create a textual hyperlink to www.openstreetmap.org, zooming and highlighting the object matching the parameters. It acts as an alternative to the template {{On OSM}} which doesn't fit nicely into a field of the {{Information}}. Suggested usage is adding the OSMLink as one of the other_fields parameter. For this purpose, it makes use of the {{Information field}} template, with a fixed field name and the OSM Link as value.

Usage


{{OSMLink |type= |OSM_ID= }}

Template parameters

ParameterDescriptionDefaultStatus
typeObject typeOSM Object type: one of node/way/relationemptyrequired
OSM_IDOSM IDOSM Object IDemptyrequired
displayoffdisplayoffoption to suppress display of the template; any value will suppress displayemptyoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

Relies on:

Example

{{OSMLink|type=way|OSM_ID=254277119}}

renders as:

OpenStreetMap
InfoField
Way 254277119

See also

Localization

English

This template is localized through {{Autotranslate}}. The layout of the template can be found under Template:OSMLink/layout.

To add your language to the list of languages supported by this template, please copy the code of Template:OSMLink/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.


Category:Templates using Autotranslate for internationalisation

Example with Information template

{{Information
|description = Example inside Information template
|source={{own}}
|author={{tl|OSMLink}}
|other fields={{OSMLink|type=way |OSM_ID=254277119 }}
}}
gives:
Category:On OSM#way-254277119
Description Example inside Information template
Source Own work
Author {{OSMLink}}
OpenStreetMap
InfoField
Way 254277119

TemplateData

A template to create a textual hyperlink to www.openstreetmap.org, zooming and highlighting the object matching the parameters. It acts as an alternative to the template On OSM which doesn't fit nicely into a field of the Information. Suggested usage is adding the OSMLink as one of the other_fields parameter. For this purpose, it makes use of the Information field template, with a fixed field name and the OSM Link as value.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
typetype

The OSM object type: node, way or relation.

Suggested values
node way relation
Example
node
Stringrequired
OSM_IDOSM_ID

The numerical OSM ID of the referenced object.

Example
254277119
Numberrequired
displayoffdisplayoff

option to suppress display of the template; any value will suppress display.

Suggested values
1
Unknownoptional
Category:Online database templates
Category:Marker templates#OSMLink Category:OpenStreetMap templates
Category:Marker templates Category:On OSM Category:Online database templates Category:OpenStreetMap templates Category:Templates using Autotranslate for internationalisation