15.082
Bearbeitungen
(zeile(args): Umstellung str.bracketSplitAndStrip(val)) |
(+ zeileGeoDaten(fbdata)) |
||
| Zeile 332: | Zeile 332: | ||
end | end | ||
t = t .. geo.osmLink(fbdata.frame, g) | t = t .. geo.osmLink(fbdata.frame, g) | ||
end | |||
t = t .. "</dd>" | |||
end | |||
-- mw.log("t = " .. t) | |||
return t | |||
end | |||
function p.zeileGeoDaten(fbdata) | |||
-- mw.log("zeileGeoDaten()") | |||
-- mw.logObject(fbdata) | |||
-- Konsolenzeile zum Debuggen: | |||
-- fbdata=p.fbdata{pargs={}}; fbdata.fullpagename="Isaak-Loewi-Straße 1, 3, 5, 7, 9, Liesl-Kießling-Straße 16"; print(p.zeileGeoDaten(fbdata)) | |||
local t = "" | |||
local geokoordinate = que.getValues(fbdata.fullpagename, "Geokoordinate", true) | |||
local geojson = que.getValues(fbdata.fullpagename, "GeoJson", true) | |||
mw.logObject(geojson) | |||
if #geokoordinate > 0 or #geojson > 0 then | |||
t = t .. "<dt>[[Attribut:Geokoordinate|Geo-Daten]]</dt><dd>" | |||
local first = true | |||
for _, g in ipairs(geokoordinate) do | |||
if first then | |||
first = false | |||
else | |||
t = t .. ",<br>" | |||
end | |||
t = t .. geo.osmLink(fbdata.frame, g) | |||
end | |||
if #geojson > 0 then | |||
if not first then | |||
t = t .. ",<br>" | |||
end | |||
t = t .. "[[" .. geojson[1] .. "|GeoJson-Karte]]" | |||
end | end | ||
t = t .. "</dd>" | t = t .. "</dd>" | ||