Module:Ordnance Survey coordinates/sandbox: Difference between revisions

Content deleted Content added
tweak documentation
make composite wrapper function
Line 339:
end
 
function oscoord.main_main(frameargs)
local args = getArgs(frame)
local input = args[1]
if empty(input) then
Line 418 ⟶ 417:
end
 
function oscoord.oscoord_oscoord(frameargs)
local output = '<span class="plainlinks nourlexpansion" style="white-space: nowrap">' .. oscoord.main_main(frameargs) .. '</span>'
if namespace == 0 then
output = output .. '[[Category:Articles with OS grid coordinates]]'
end
return output
end
 
function oscoord.main(frame)
local args = getArgs(frame)
return oscoord._main(args)
end
 
function oscoord.oscoord(frame)
local args = getArgs(frame)
return oscoord._oscoord(args)
end
 
Line 650 ⟶ 659:
local args = getArgs(frame)
return args[1] and args[2] and oscoord._WGS2OSGB(args[1],args[2]) or ''
end
 
function oscoord.LL2OS(frame)
local args = getArgs(frame)
if not args[1] or not args[2] then return '' end
local newArgs = {oscoord._WGS2OSGB(args[1],args[2])}
return oscoord._oscoord(newArgs)
end