Template:Taginfo entry/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

This is a documentation subpage for Template:Taginfo entry.
It contains usage information, categories and other content or metadata that is not part of the original template.

This template produces table cells with a taginfo counter.

information icon

This template should NOT be used outside of tables, because the cell syntax would then become visible text

For example, if you write {{Taginfo entry|building}}, the result would be:

|style="text-align:right;"|

Usage

This template is made for use within tables and generates a table cell!

Syntax

{{Taginfo entry|key|value|optional parameters}}

Parameters

  • 1 – the tag key.
  • 2 – the tag value (optional).
  • link = – if yes the counter links to the taginfo website (optional).
  • region = – to set a regional instance of taginfo, one of AU, DE, or RU (optional).
  • site = – to set a regional instance of taginfo by its name in the taginfo URL (optional), e.g. africa, africa:algeria, or europe:france.

Note: If either region or site is specified, link doesn't work.

Examples

{{Taginfo entry|building}} {{Taginfo entry|building|detached}}

You can also choose statistics for a specific region:

{{Taginfo entry|building|region=RU}} {{Taginfo entry|building|detached|region=RU}}

It is also possible to make a convenient sorting by the number of uses:

Tag Count
building=apartments

building=residential

building=house

building=detached

building=farm_auxiliary

building=garage

building=hut

building=industrial

building=shed

building=yes

The table above is produced by the following code structure (note the "//Rows" line, which is meant to be replaced by actual table rows):

{|class="wikitable sortable"
!Tag
!data-sort-type="number"|Count
|-
|{{Tag|building|apartments}}{{Taginfo entry|building|apartments}}
|-
//Rows
|-
|{{Tag|building|yes}}{{Taginfo entry|building|yes}}
|}

See also