15.457
Bearbeitungen
(Verschiebung GeoJson-Karte von Vorlage:Karte hierher) |
(location/locationlist von Vorlage:Karte hierher verschoben) |
||
| Zeile 144: | Zeile 144: | ||
-- Karte | -- Karte | ||
local map_args = { | local map_args = { "", ["zoom"] = args["zoom"], -- gemeinsame settings | ||
["width"] = args["width"], ["height"] = args["height"], | ["width"] = args["width"], ["height"] = args["height"], | ||
["enablefullscreen"] = "yes", ["resizable"] = "yes"} | ["enablefullscreen"] = "yes", ["resizable"] = "yes"} | ||
-- geojson | |||
if wik.pageExists(geojson_fullpagename) then | if wik.pageExists(geojson_fullpagename) then | ||
map_args["geojson"] = geojson_pagename | map_args["geojson"] = geojson_pagename | ||
table.insert(map_args, "") -- dummy / keine location | table.insert(map_args, "") -- dummy / keine location | ||
if #geoobjects > 0 then | |||
kategorien["Hat geojson und location/lat/lon"] = true | |||
end | |||
else | |||
-- location/lat/lon | |||
for _, o in ipairs(geoobjects) do | |||
if o["Geokoordinate"] ~= nil then | |||
if map_args[1] ~= "" then | |||
map_args[1] = map_args[1] .. ";" | |||
end | |||
map_args[1] = map_args[1] .. o["Geokoordinate"] | |||
if o["KartePopupTitle"] ~= nil then | |||
map_args[1] = map_args[1] .. "~" .. o["KartePopupTitle"] | |||
if o["KartePopupText"] ~= nil then | |||
map_args[1] = map_args[1] .. "~" .. o["KartePopupText"] | |||
end | |||
end | |||
end | |||
end | |||
end | end | ||
if | if map_args[1] ~= "" or map_args["geojson"] ~= nil then | ||
mw.logObject(map_args, "map_args") | mw.logObject(map_args, "map_args") | ||
t = t .. frame:callParserFunction("#display_map", map_args) | t = t .. frame:callParserFunction("#display_map", map_args) | ||
else | |||
-- bisherige Vorlagen-Karte | |||
local karte_vorlage = "Karte/Legacy" | local karte_vorlage = "Karte/Legacy" | ||
if com.isTrue(args["Work"]) then | if com.isTrue(args["Work"]) then | ||
| Zeile 179: | Zeile 194: | ||
kategorien["Hat Karte"] = true | kategorien["Hat Karte"] = true | ||
-- Check "Hat Geolokation, aber keine Geokoordinate" | -- Check "Hat Geolokation, aber keine Geokoordinate" | ||
for _, o in ipairs(geoobjects) do -- Check "Hat Geolokation, aber keine Geokoordinate" | |||
if o["Geolokation"] ~= nil and o["Geokoordinate"] == nil then | |||
kategorien["Hat Geolokation, aber keine Geokoordinate"] = true | |||
end | |||
end | |||
end | |||
-- nun setzen | -- nun setzen | ||
for k, _ in pairs(kategorien) do | for k, _ in pairs(kategorien) do | ||