Modul:Faktenbox/Zeilen: Unterschied zwischen den Versionen

Aus FürthWiki

zeileGeoDaten() doppelte Koordinaten ausfiltern
(fix zeileGeoDaten())
(zeileGeoDaten() doppelte Koordinaten ausfiltern)
Zeile 103: Zeile 103:
local t = ""
local t = ""
if fbdata.geoobjects ~= nil then
if fbdata.geoobjects ~= nil then
for _, o in ipairs(fbdata.geoobjects) do
for i, o in ipairs(fbdata.geoobjects) do
if o["Geokoordinate"] ~= nil then
local geokoordinate = o["Geokoordinate"]
if t ~= "" then
if geokoordinate ~= nil then
t = t .. ",<br>"
local double = false -- doppelte Koordinaten ausfiltern
for d = 1, i - 1 do
if fbdata.geoobjects[d]["Geokoordinate"] == geokoordinate then
double = true
break
end
end
if not double then
if t ~= "" then
t = t .. ",<br>"
end
t = t .. geo.osmLink(fbdata.frame, geokoordinate)
end
end
t = t .. geo.osmLink(fbdata.frame, o["Geokoordinate"])
end
end
end
end