Module:Ordnance Survey coordinates/sandbox: Difference between revisions

Content deleted Content added
sync sandbox
use new geohack URL structure
Line 362:
return html
end
-- https://geohack.toolforge.org/geohack.php?pagename=Mount_Whitney&params=36.578580925_N_118.29199495_W_type:mountain_region:US-CA_scale:100000_source:NGS
local url = '[https://toolsgeohack.wmflabstoolforge.org/geohack/en/'..LL[3]..php?';'..LL[4]
if pagename ~= nil then
url = url..'?pagename='..pagename..'&'
end
url = url..'params='..LL[3]..'_N_'
if LL[4] < 0 then
url = url..(-LL[4])..'_W'
else
url = url..LL[4]..'_E'
end
for i = restargs,#args do
url = url..'_'..args[i]
end
if string.find(input,"region") == nil then
url = url..'_region:'..LL[1]
end
if pagename ~= nil then
url = url..'?pagename='..pagename
end
url = url..' '..linktitle..']'