Module:Coordinates: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(update from sandbox. Add export hook for coord_url, remove uneccesary use of frame:preprocess)
(change requested by User:Hike395 to fix default hemisphere)
Line 367: Line 367:
local seconds = tonumber(seconds_str) or 0
local seconds = tonumber(seconds_str) or 0
local factor
local factor = 1
direction = mw.ustring.gsub(direction, '^[ ]*(.-)[ ]*$', '%1');
direction = mw.ustring.gsub(direction, '^[ ]*(.-)[ ]*$', '%1');
if direction == "N" or direction == "E" then
if direction == "S" or direction == "W" then
factor = 1
else
factor = -1
factor = -1
end
end