Modul:Location map: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Baris 119:
-- Finds a parameter in a transclusion of {{Coord}}.
local function coord2text(para,coord) -- this should be changed for languages which do not use Arabic numerals or the degree sign
local result = mw.text.split(mw.ustring.match(coord,'%-?[%.%d]+°[NS] %-?[%.%d]+°[EW]') or '', '[ °]')
if para == 'longitude' then result = {result[3], result[4]} end
if not tonumber(result[1]) or not result[2] then return error('Malformed coordinates value', 2) end
Baris 363:
if not longitude then
error('No value was provided for longitude')
elseif not latitude then
error('No value was provided for latitude')
|