Module:Titled coords/doc
Jump to navigation
Jump to search
| icon | This is a documentation subpage for Module:Titled coords. It may contain usage information, categories and other content that is not part of the original module page. |
| File:Greek lc beta icon.svg | This module is rated as beta. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected. |
| File:Lua-Logo.svg | This module depends on the following other modules: |
Description
[edit source]This module generates titled coordinates from raw coordinates extracted from Wikidata. Currently, {{Wikidata}} does not support adding a title when requesting coordinates. So, when {{GeoGroup}} is used on a page with coordinates directly from Wikidata, the OpenStreetMap page will show an ordinal number as the title for each listed coordinate rather than a useful title. Using this module fixes the problem.
| File:Information icon4.svg | Pages should not call this module directly but rather use {{Titled_coords}} as it supports both named and unnamed parameters. The template also extracts the raw coordinates from Wikidata using {{Wikidata}}. |
Usage
[edit source]Call from Template
[edit source]{{#invoke:Titled coords|main|Wikidata raw coords|title|options}}
Wikidata raw coords is the unformatted raw coordinates where each field is separated by an forward slash.
e.g. 50/27/40/N/122/17/42/W
Call from LUA modules
[edit source] local Titled_coords = require('Module:Titled_coords')
local coords = Titled_coords.build(raw_coords, title, options)