Modul:Karte/Work: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 19: Zeile 19:


function p.karte(frame, args)
function p.karte(frame, args)
mw.log("karte(frame, args)")
-- mw.log("karte(frame, args)")
mw.logObject(args, "args")
-- mw.logObject(args, "args")
-- Konsolenzeilen zum Debuggen:
-- Konsolenzeilen zum Debuggen:
-- =p.karte(mw.getCurrentFrame(), args)
-- =p.karte(mw.getCurrentFrame(), args)
Zeile 77: Zeile 77:
kategorien["Hat Objektlokation, ist aber ehemaliges Objekt"] = true
kategorien["Hat Objektlokation, ist aber ehemaliges Objekt"] = true
else -- if args["lat"] == nil or args["lon"] == nil then -- to do: dieses if später rausschmeißen nach Aufbau nominatim.fuerthwiki.de
else -- if args["lat"] == nil or args["lon"] == nil then -- to do: dieses if später rausschmeißen nach Aufbau nominatim.fuerthwiki.de
mw.logObject(location, "location")
local geocode = frame:callParserFunction("#geocode", location)
local geocode = frame:callParserFunction("#geocode", location)
if geocode ~= "Geocoding failed" then
if geocode ~= "Geocoding failed" then
Zeile 142: Zeile 141:
mw.smw.set(attrlist)
mw.smw.set(attrlist)
-- geoobjects als subobjects setzen
-- geoobjects als subobjects setzen
mw.logObject(geoobjects, "geoobjects")
-- mw.logObject(geoobjects, "geoobjects")
for _, o in ipairs(geoobjects) do
for _, o in ipairs(geoobjects) do
o["SubObjektTyp"] = "Geo"
o["SubObjektTyp"] = "Geo"
Zeile 186: Zeile 185:
-- Karte (display_map)
-- Karte (display_map)
if map_args[1] ~= "" or map_args["geojson"] ~= nil then
if map_args[1] ~= "" or map_args["geojson"] ~= nil then
mw.logObject(map_args, "map_args")
-- mw.logObject(map_args, "map_args")
mw.logObject(map_args[1], "map_args[1]")
t = t .. frame:callParserFunction("#display_map", map_args)
t = t .. frame:callParserFunction("#display_map", map_args)
if geoobjects.geojson.arg ~= nil and map_args["geojson"] == nil then
if geoobjects.geojson.arg ~= nil and map_args["geojson"] == nil then
Zeile 231: Zeile 229:
end
end


mw.logObject(t, "t")
-- mw.logObject(t, "t")
t = frame:preprocess(t)
t = frame:preprocess(t)
return t, geoobjects
return t, geoobjects