15.838
Bearbeitungen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 149: | Zeile 149: | ||
end | end | ||
-- Karten-Argumente (display_map) erstellen | if not com.isTrue(args["nomap"]) then -- keine Karte anzeigen? | ||
-- sondern nur geoobject und SMW-DB | |||
-- Karten-Argumente (display_map) erstellen | |||
local map_args = { "", ["zoom"] = args["zoom"], -- gemeinsame settings | |||
["width"] = args["width"], ["height"] = args["height"], | |||
["enablefullscreen"] = "yes", ["resizable"] = "yes"} | |||
-- geojson-Argument | |||
if geoobjects.geojson.exists then | |||
map_args["geojson"] = geoobjects.geojson.pagename | |||
if #geoobjects > 0 then | |||
kategorien["Hat geojson und location/lat/lon"] = true | |||
end | |||
end | end | ||
-- location/lat/lon-Argumente | |||
if not (geoobjects.geojson.exists and -- Pin-Anzeige deaktivieren, wenn GeoJson vorhanden und hide_loc_latlon=Ja | |||
com.isTrue(args["hide_loc_latlon"])) then -- SMW-DB wird trotzdem geschrieben | |||
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 | end | ||
end | end | ||
-- Karte (display_map) | |||
if map_args[1] ~= "" or map_args["geojson"] ~= nil then | |||
-- mw.logObject(map_args, "map_args") | |||
-- | t = t .. frame:callParserFunction("#display_map", map_args) | ||
if geoobjects.geojson.arg ~= nil and map_args["geojson"] == nil then | |||
t = t .. "<small>Karte [" .. geoobjects.geojson.url .. " " .. | |||
geoobjects.geojson.arg .. "] nicht gefunden</small>" | |||
end | |||
else | |||
if com.isTrue(args["form"]) then | |||
t = t .. "Positionsangabe fehlt oder fehlende Karte<br>" .. | |||
geoobjects.geojson.fullpagename .. | |||
"<br>Bitte Position in Formular eintragen oder" | |||
else | |||
t = t .. "Breiten-/Längengrad (lat/lon) fehlt, Objekt-Lokation " .. | |||
"(location) fehlt oder fehlende Karte<br>" .. | |||
geoobjects.geojson.fullpagename | |||
end | |||
t = t .. "<br>[" .. geoobjects.geojson.url .. | |||
" Hier klicken zum Anlegen der Karte<br>" .. | |||
geoobjects.geojson.fullpagename .. | |||
"].<br>Siehe auch [[Hilfe:Karten]]" | |||
kategorien["Ohne Position"] = true | |||
end | end | ||
if com.isTrue(args[" | -- Box um Karte | ||
if com.isTrue(args["box"]) then | |||
local headline = args["headline"] or geoobjects.geojson.arg or pagename | |||
t = t | t = box.box{headline = headline, content = t, textalign = center} | ||
end | end | ||
-- | end -- if not com.isTrue(args["nomap"]) then | ||
-- Kategorien setzen | -- Kategorien setzen | ||