Modulo:Mapframe/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m errore in simbolo predefinito per sinottico |
m tolgo qualche parentesi tonda non necessaria |
||
Riga 18:
local colore = args.colore or '#b80000' --colore
local simbolo = args.simbolo or '-number' --simbolo
if
local gruppo = args.gruppo or ''
local autozoom = args.autozoom or 's'
local dsimbolo = 'medium'
--if
local cornice
if args.cornice then cornice = tonumber(args.cornice) or 1 else cornice = 1 end
Riga 43:
dsimb = args['dim_simbolo' .. num] or dsimbolo, --dimensione del simbolo da mostrare
}
if
points[num].simb = '-number-' .. gruppo end
if
error(string.format('latitudine non valida per il punto %d', num), 2)
elseif
error(string.format('longitudine non valida per il punto %d', num), 2)
else
Line 65 ⟶ 67:
m_args.align = 'right'
-- valori per sinottico
if
m_args.width = 260
m_args.height = 260
Line 76 ⟶ 78:
-- elimina cornice per cornice = 0 e per sinottico = 1
if
-- valore ingrandimento
if args.zoom then
m_args.zoom = tonumber(args.zoom)
elseif
if
m_args.zoom = 10 -- valore predefinito per singolo punto
if
m_args.zoom = 13 -- valore predefinito per sinottico con singolo punto
end
elseif
local dx = 1.1 * (lon2 - lon1) / 360
local dy = 1.1 * (math.log(math.tan(math.pi * (1 + lat2 / 90) / 4)) - math.log(math.tan( math.pi * (1 + lat1 / 90) / 4))) / (2 * math.pi)
Line 94 ⟶ 96:
if dx == 0 then scalax = 18 else scalax = math.floor(-math.log(dx) / math.log(2)) end
if dy == 0 then scalay = 18 else scalay = math.floor(-math.log(dy) / math.log(2)) end
if
m_args.zoom = 10 -- valore default per singolo punto
else
Line 102 ⟶ 104:
end
-- esclude didascalia per cornice = 0 e per sinottico = 1
if
if args.centro_lon then
m_args.longitude = tonumber(args.centro_lon)
elseif geo == -1 then
if
m_args.longitude = points[1].lon
else
Line 116 ⟶ 118:
if args.centro_lat then
m_args.latitude = tonumber(args.centro_lat)
elseif
if
m_args.latitude = points[1].lat
else
|