Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:WikidataCoord/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<!-- {{Module rating |<!-- Values: pre-alpha β’ alpha β’ beta β’ release β’ protected -- If a rating not needed/relevant, delete this template call -- >}} --> <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{high-use}} This module accepts, as the first unnamed or positional parameter, a latitude and longitude string in the form returned by Wikidata or as plain-text. The lat/long is stripped of all but its numeric values which are then used in a call to [[Template:Coord]] for proper visual rendering and link to GeoHack. Wikidata returns text strings in this form where the minute and second symbols are html numeric character references for single and double quotes: :<code><nowiki>{{#property:P625|from=Q218501}}</nowiki></code> ::{{code|{{#property:P625|from=Q218501}}}} :::{{#property:P625|from=Q218501}} The module will accept degree-minute-second (dms) plain-text strings in the form: :<code>47Β°34'12"N, 52Β°40'55"W</code> where the minutes and seconds indicators are single and double quotes or single and double [[Prime (symbol)|prime symbols]] (β², β³; U+2032, U+2033) Latitude and longitude in decimal-degree format is also accepted: :<code>53.67667Β°N 112.82861Β°W</code> Because Template:Coord supports a variety of coordinate and template parameters, this module accepts but does not act on these parameter except to pass them on in the call to Template:Coord. In the module <code><nowiki>{{#invoke:}}</nowiki></code>, coordinate parameters, if provided, must be the second unnamed or positional parameter. The template parameters are named so their order in the <code><nowiki>{{#invoke:}}</nowiki></code> is not important. == Usage == A typical template use where the latitude / longitude is drawn from Wikidata might look like this: :<code><nowiki>{{#invoke:WikidataCoord|main|{{#property:P625|from={{{1|}}}}}|{{{2|}}}|display={{{display|}}}|format={{{format|}}}|name={{{name|}}}|notes={{{notes|}}}}}</nowiki></code> <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly>
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Stockhub entities used in this page
Q218501
: Statement: P625
Templates used on this page:
Template:Code
(
edit
)
Template:High-use
(
edit
)