From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Taginfo/Taglists
· Afrikaans · Alemannisch · aragonés · asturianu · Aymar aru · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · bamanankan · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · kurdî · Latina · latviešu · Lëtzebuergesch · lietuvių · Limburgs · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Türkmençe · Vahcuengh · vèneto · walon · Wolof · Yorùbá · Zazaki · isiZulu · српски / srpski · авар · Аҧсшәа · башҡортса · беларуская · български · қазақша · Кыргызча · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · भोजपुरी · मराठी · संस्कृतम् · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

The taginfo API can give you extended lists of tags. You decide which tags you want in that list and taginfo will add element types, description, example images, and (optionally) usage counts from the database.

This can be used to create tables of tags in the OSM wiki using a simple template. Instead of assembling and maintaining the tables manually, let taginfo do the work for you.

Currently we are rolling out Taglists in this wiki. For the project page, see Taginfo/Taglists/Wiki project.

Embed tag lists in this wiki

Use the template Taglist with a list of tags as the tags parameter:


And you'll get a table like this:

LOADING TAG LIST... (If you do not see this tag list, you need to enable Javascript)

Note that you can use the Asterisk (*) instead of a value to get the description/icon from a key.

Setting the language

You can set the language the list should be in using the lang parameter. The default is en (English). So...


...gives you a table in Russian:

LOADING TAG LIST... (If you do not see this tag list, you need to enable Javascript)

Note that for the localization to work two things are needed:

1. Taginfo needs to have the texts used in the table header for the language, they need to be in https://github.com/joto/taginfo/blob/master/web/public/js/taglists.js. (Updates will only be available after manual intervention which can take a few days.)

2. The key/tag description must be available in the wiki in this language. Update the info box on the key/tag page for this to work. Updates will be available after the next update of taginfo, usually within a day.

Add object counts to table

Add the parameter with_count=true if you want to add the usage counts from the database:


will show up as:

LOADING TAG LIST... (If you do not see this tag list, you need to enable Javascript)

Add rendering example to table

Add the parameter with_rendering=true if you want to add an image showing how the tag is rendered in openstreetmap-carto, the standard OSM map stylesheet:


will show up as:

LOADING TAG LIST... (If you do not see this tag list, you need to enable Javascript)

Create a list with "all" tags for a key

You can create a list of "all" tags for a given key by just giving that key in the list:

LOADING TAG LIST... (If you do not see this tag list, you need to enable Javascript)

The list will not contain all tags, but only those documented on the wiki. To be more specific: The tag page must exist and contain the Template:ValueDescription info box. This use is probably not what you want in most cases, because the list can and will change without you noticing and you might get strange tags in there you didn't want to have. So it is better to write down exactly what tags you want to have in this list.

Embed tag lists in your own web pages

Include jQuery and taglists.js in your web page:

<script type="text/javascript" src=".../jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="https://taginfo.openstreetmap.org/js/taglists.js"></script>

Now you can add tag lists to your web page by adding a small HTML snippet:

<div class="taglist"

The list of tags can be anything in the format: KEY1=VALUE1a,VALUE1b,...,KEY2=VALUE2a,VALUE2b,.... If you only add a key, the table will contain all values of that key we have a wiki page for.

You can add options using data-taginfo-taglist-options. This allows you to change the language used:

<div class="taglist"
    data-taginfo-taglist-options='{"lang": "de"}'>

And you can add usage counts from the database:

<div class="taglist"
    data-taginfo-taglist-options='{"with_count": true}'>

Lastly you have to call the convert_to_taglist function to create the tables:

<script type="text/javascript">
jQuery(document).ready(function() {

This will replace the div you entered into your page with the table.

The table element will have a class of taginfo-taglist. You can use this to style the table with CSS.

This functionality is using the tags/list taginfo API call. See https://taginfo.openstreetmap.org/taginfo/apidoc#api_4_tags_list for further information.