Moduł:Mapa: Różnice pomiędzy wersjami

[wersja przejrzana][wersja przejrzana]
Usunięta treść Dodana treść
uniwersalny alt dla punktu wprowadzonego przez współrzędne infoboksu na okoloczność wielu punktów
+ pole 'alt' w samodzielnych mapach lokalizacyjnych
Linia 170:
end
 
local function drawMap(builder, get, width, fontSize, data, infoboxCoordinates, customAlt)
local reliefImage = mw.text.trim(get("mapa"))
local reliefTitle = mw.title.new("Plik:"..reliefImage)
Linia 254:
end
local altInfo = get("alt") or ""customAlt
if #not altInfo == 0 then
local galtInfo = get("dopełniaczalt") or ""
if g#altInfo == 0 then
altInfolocal g = get("Mapa konturowa dopełniacz"..g)
if #inside == 1g then
altInfo = "Mapa konturowa "..g
end
end
end
if (#altInfo > 0) and (#inside > 0) then
 
local extAlt = inside[1].posDesc..alt.thereIs..(inside[1].alt or inside[1].autoAlt)
if (#altInfo > 0) and (#inside > 0) then
elseif if #inside == 21 then
local extAlt = inside[1].posDesc..alt.thereIs..(inside[1].alt or inside[1].autoAlt)
altInfo = altInfo..", "..extAlt
if #inside == 1 then
elseif (#inside >== 1) and infoboxCoordinates2 then
altInfo = altInfo..", "..extAlt
local extAlt2 = (alt.relativeDescription2combine2..inside[code2] or alt.relativeDescription2[false])posDesc..alt.thereIs2thereIs..(inside[2].alt or inside[2].autoAlt)
elseif #inside == 2 then
local if extAlt2 = alt.combine2..inside[21].posDesc..alt.thereIs..(inside[2].alt or== inside[2].autoAlt)posDesc then
if local code = relativePositionDescriptionCode(inside[1].posDesc ==, inside[2].posDesc then)
local extAlt2 = (alt.relativeDescription2[code] =or relativePositionDescriptionCodealt.relativeDescription2[false])..alt.thereIs2..(inside[12],.alt or inside[2].autoAlt)
end
extAlt2 = (alt.relativeDescription2[code] or alt.relativeDescription2[false])..alt.thereIs2..(inside[2].alt or inside[2].autoAlt)
altInfo = altInfo..", "..extAlt..", "..extAlt2
elseif (#inside > 1) and infoboxCoordinates then
altInfo = altInfo..", "..extAlt
end
altInfo = altInfo..", "..extAlt..", "..extAlt2
elseif (#inside > 1) and infoboxCoordinates then
altInfo = altInfo..", "..extAlt
end
end
Linia 668 ⟶ 671:
:css( { ["font-weight"]= "bold", color="gray" } )
:wikitext("Położenie na mapie ", get("dopełniacz"))
drawMap(map1:tag("div"):addClass("mapa-lokalizacyjna"), get, mapWidth, 12.6, pointsData, coordinates, false)
table.insert(result, '|- class="infobox-locationmap" style="background-color:white; text-align:center; border-top:1px solid #aaa;"\n|colspan="2"|')
table.insert(result, tostring(map1:allDone()))
Linia 709 ⟶ 712:
local align = args["wyrównanie"] or "right"
local footer = args["podpis"]
local alt = args["alt"]
local pointsData = decodePoints(args["punkty mapy"])
Linia 739 ⟶ 743:
--:addClass("mapa-lokalizacyjna")
:css({ margin = "0 auto", width = tostring(width).."px" })
drawMap(builder, get, width, fontSize, pointsData, false, alt)
if pointsData and (#pointsData == 1) and (mw.title.getCurrentTitle().namespace == 0) then
builder:wikitext("[[Kategoria:Mapa lokalizacyjna z jednym punktem]]")
Linia 775 ⟶ 779:
local width = tonumber(args["rozmiar"]) or 238
local fontSize = tonumber(args["font-size"]) or 12.6
local alt = args["alt"]
local pointsData = decodePoints(args["punkty mapy"])
Linia 788 ⟶ 793:
:addClass("mapa-lokalizacyjna")
:css({ margin ="0 auto", width = tostring(width + 2).."px", padding = "3px", margin = "3px" })
drawMap(builder, get, width, fontSize, pointsData, false, alt)
if pointsData and (#pointsData == 1) and (mw.title.getCurrentTitle().namespace == 0) then
builder:wikitext("[[Kategoria:Mapa lokalizacyjna z jednym punktem]]")