Modul:Faktenbox/Zeilen: Unterschied zwischen den Versionen

fix zeileGeoDaten()
(zeileGeoDaten() verwendet geoobjects)
(fix zeileGeoDaten())
Zeile 103: Zeile 103:
local t = ""
local t = ""
if fbdata.geoobjects ~= nil then
if fbdata.geoobjects ~= nil then
-- die Zeile
for _, o in ipairs(fbdata.geoobjects) do
if #fbdata.geoobjects > 0 or fbdata.geoobjects.geojson.exists then
if o["Geokoordinate"] ~= nil then
t = t .. "<dt>Geo-Daten</dt><dd>"
if t ~= "" then
local first = true
for _, o in ipairs(fbdata.geoobjects) do
if first then
first = false
else
t = t .. ",<br>"
t = t .. ",<br>"
end
end
t = t .. geo.osmLink(fbdata.frame, o["Geokoordinate"])
t = t .. geo.osmLink(fbdata.frame, o["Geokoordinate"])
end
end
if fbdata.geoobjects.geojson.exists then
end
if not first then
if fbdata.geoobjects.geojson.exists then
t = t .. ",<br>"
if t ~= "" then
end
t = t .. ",<br>"
t = t .. "[[" .. fbdata.geoobjects.geojson.fullpagename .. "|GeoJson-Karte]]"
end
end
t = t .. "</dd>"
t = t .. "[[" .. fbdata.geoobjects.geojson.fullpagename .. "|GeoJson-Karte]]"
end
if t ~= "" then
t = "<dt>Geo-Daten</dt><dd>" .. t .. "</dd>"
end
end
end
end