| This is a documentation subpage for Template:ElementUsage. It contains usage information, categories and other content or metadata that is not part of the original template. |
This template provides a visual representation of the OpenStreetMap elements which are suitable for use with a given feature, linking each icon to a page providing further details of that element.
Where no language is specified, each element icon hyperlinks to the corresponding English-language description page (Node, Way, Area, Relation). Where a language is specified, each icon links to the first available of: local Node (e.g. FR:Node) local Elements (e.g. ES:Elements) with a suitable anchor, or the appropriate English language page.
Usage
Full parameter set in vertical format
Vertical list |
Prerequisites |
Brief instructions / notes
|
{{ElementUsage
| onNode =
| onWay =
| onArea =
| onRelation =
| lang =
| size =
| gap =
| margin-left =
| margin-right =
| margin-top =
| margin-bottom =
}}
|
|
yes/no
yes/no
yes/no
yes/no
en, de, fr, ja, etc.
default 30px
default 3px
default 3px
default 3px
default 2px
default 2px
|
- If a field name is listed in the Prerequisites column it is a prerequisite for the field to the left.
Parameters
The following parameters are recognised:
Content
- onNode:
yes
if the feature being described is suitable for use on node elements, no
otherwise
- onWay:
yes
if the feature being described is suitable for use on way elements, no
otherwise
- onArea:
yes
if the feature being described is suitable for use on area elements, no
otherwise
- onRelation:
yes
if the feature being described is suitable for use on relation elements (except multipolygons, covered by onArea), no
otherwise
Language
- lang: the code for the language to use for the display of pop-up information
Layout
- size: the size of each component image, as specified in Wikipedia:Extended image syntax (defaults to
30px
)
- gap: the gap between each component image, specified in CSS syntax (defaults to
3px
)
- margin-left: the gap before the first component image, specified in CSS syntax (defaults to
3px
)
- margin-right: the gap after the last component image, specified in CSS syntax (defaults to
3px
)
- margin-top: the gap above the component images, specified in CSS syntax (defaults to
2px
)
- margin-bottom: the gap below the component images, specified in CSS syntax (defaults to
2px
)
Examples
Wikitext
|
Produces
|
|{{ElementUsage
| onNode = yes
| onWay = yes
| onArea = no
| onRelation = no
| lang = en
}}
|
|
|{{ElementUsage
| onNode = yes
| onWay =
| onArea = yes
| onRelation = no
| lang = fr
}}
|
|
|{{ElementUsage
| onNode = no
| onWay = no
| onArea = no
| onRelation = yes
| lang = ru
| size = 20px
| gap = 0px
}}
|
|
{{ElementUsage
| onNode = yes
| onWay = yes
| onArea = no
| onRelation = no
| lang = en
}}
|
|
{{ElementUsage
| onNode = yes
| onWay =
| onArea = yes
| onRelation = no
| lang = fr
}}
|
|
{{ElementUsage
| onNode = no
| onWay = no
| onArea = no
| onRelation = yes
| lang = ru
}}
|
|
{{ElementUsage
| onNode = yes
| onWay = no
| onArea = yes
| onRelation = no
| lang = cs
}}
|
|
{{ElementUsage
| onNode = yes
| onWay = no
| onArea = yes
| onRelation = no
| lang = pt
}}
|
|
{{ElementUsage
| onNode = yes
| onWay = no
| onArea = yes
| onRelation = no
| lang = es
}}
|
|
See also