Anonymous user
Module:Coordinates: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 75:
local coordinateSpec = {}
local errors = {}
errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS' );▼
if isEmpty(long_d) then▼
table.insert(errors, {"parseDMS", "Missing longitude" })▼
end
if tonumber(lat_d) < 0 then
table.insert( errors, { 'parseDMS', 'Invalid latitude' } );
end
if lat_m == nil and lat_s == nil and long_m == nil and long_s == nil then
Line 100 ⟶ 108:
end
▲ errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS' );
▲ if isEmpty(long_d) then
▲ table.insert(errors, {"parseDMS", "Missing longitude" })
▲ end
return coordinateSpec, errors
|