19.638
Bearbeitungen
(getKartenArgs() - "Debug") |
(kartenTab() + geocode Gebäude) |
||
| Zeile 27: | Zeile 27: | ||
if #gebaeude > 0 then -- Gebäude angegeben? | if #gebaeude > 0 then -- Gebäude angegeben? | ||
local locationlist = "" | local locationlist = "" | ||
for _, g in ipairs(gebaeude) do -- alle Gebäude durchiterieren | for _, g in ipairs(gebaeude) do -- alle Gebäude durchiterieren | ||
local seite = smw.getValues(g, "Seite", true) | local seite = smw.getValues(g, "Seite", true) -- Seite mit Geolokation-Wert abfragen | ||
if seite[1] ~= fbdata.pagename then -- Weiterleitung auf sich selbst rausfiltern | if seite[1] ~= fbdata.pagename then -- Weiterleitung auf sich selbst rausfiltern | ||
local geolokation = smw.getValues(g, "Geolokation", true) | local geolokation = smw.getValues(g, "Geolokation", true) | ||
for _, l in ipairs(geolokation) do -- alle Geolokationen eines Gebäudes durchiterieren | if #geolokation > 0 then | ||
if locationlist ~= "" then | for _, l in ipairs(geolokation) do -- alle Geolokationen eines Gebäudes durchiterieren | ||
if locationlist ~= "" then | |||
locationlist = locationlist .. ";" | |||
end | |||
locationlist = locationlist .. l | |||
end | |||
else | |||
local location = g .. ",Fürth,Bayern,Deutschland" -- #geocode probieren | |||
local geocode = fbdata.frame:callParserFunction("#geocode", location) | |||
if geocode ~= "Geocoding failed" then | |||
if locationlist ~= "" then | |||
locationlist = locationlist .. ";" | |||
end | |||
locationlist = locationlist .. location | |||
end | end | ||
end | end | ||
end | end | ||