local args = {} -- argomenti passati al template
local errorTable = {} -- table per contenere gli errori da ritornare
-- Import
local htmlBuilder = require("Modulo:HtmlBuilder")
-- Configurazione
(args["name"] and ("&title=" .. mw.uri.encode(args["name"])) or "")
root = htmlBuildermw.html.create('')
root
.:tag("span")
.:addClass("plainlinks nourlexpansion")
.:wikitext("[" .. url)
.:tag("span")
.:addClass(defaultFormat == "dec" and "geo-nondefault" or "geo-default")
.:tag("span")
.:addClass("geo-dms")
.:attr("title", "Mappe, foto aeree e altri dati per questa posizione")
.:tag("span")
.:addClass("latitude")
.:wikitext(tostring(dmsLat))
.:done()
.:wikitext(" ")
.:tag("span")
.:addClass("longitude")
.:wikitext(tostring(dmsLong))
.:done()
.:done()
.:done()
.:tag("span")
.:addClass("geo-multi-punct")
.:wikitext(" / ")
.:done()
.:tag("span")
.:addClass(defaultFormat == "dec" and "geo-default" or "geo-nondefault")
.:wikitext(args["name"] and "<span class=\"vcard\">" or "")
.:tag("span")
.:addClass("geo-dec")
.:attr("title", "Mappe, foto aeree e altri dati per questa posizione")
.:wikitext(decLat .. " " .. decLong)
.:done()
.:tag("span")
.:attr("style", "display:none")
.:tag("span")
.:addClass("geo")
.:wikitext(decLat:getDeg() .. "; " .. decLong:getDeg())
.:done()
.:done()
.:wikitext(args["name"] and ("<span style=\"display:none\"> (<span class=\"fn org\">" ..
args["name"] .. "</span>)</span></span>") or "")
.:done()
.:wikitext("]")
.:done()
-- formatta il risultato a seconda di args["display"] (nil, "inline", "title", "inline,title")
|