Module:Ordnance Survey coordinates/doc: Difference between revisions

Content deleted Content added
expand
Usage: swap
 
Line 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
 
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}}
 
* The <code>oscoord</code> function returns the link wrapped in a span.
Line 21 ⟶ 16:
* 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 ==