Module:Ordnance Survey coordinates/doc: Difference between revisions

Content deleted Content added
list other dependencies
Usage: swap
 
(8 intermediate revisions by the same user not shown)
Line 1:
{{Modulehigh rating|betause}}
{{Module rating|release}}
{{Lua|Module:Arguments|Module:Yesno|Module:If preview}}
== Usage ==
Line 10 ⟶ 11:
:<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|main|SK135733|Miller's Dale<nowiki>}}</nowiki></code> ← Second argument is used as link text
:<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|main|SK135733_scale:25000_region:GB-DBY<nowiki>}}</nowiki></code> ← extra underscored parameters passed to geohack
 
* The <code>oscoord</code> function returns the link wrapped in a span.
* The {{para|rawurl}} returns the simple URL, not a link.
* Template that wraps main is available at {{tl|Ordnance Survey url}}.
* For other template wrapping, see [[Template:Gbmapping/doc]]
 
Also converts from lat/long back to OS grid ref:
:<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|WGS2OSGB|53.256538|-1.799102<nowiki>}}</nowiki></code> → SK1350073300
:<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|LL2OS|53.256538|-1.799102<nowiki>}}</nowiki></code> → {{OS coord|SK1350073300}}
:<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|LL2OS|53.256538|-1.799102|scale:25000<nowiki>}}</nowiki></code> → {{OS coord|SK1350073300_scale:25000}}
 
== License ==
{{GPL-2}}
 
== Tracking categories ==
*{{clc|Pages with malformed OS coordinates}}
*{{clc|Articles with OS grid coordinates}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |