15.457
Bearbeitungen
(Umstellung width/height und nil args) |
(Verschiebung GeoJson-Karte von Vorlage:Karte hierher) |
||
| Zeile 36: | Zeile 36: | ||
local geojson_pagename = args["geojson"] or pagename | local geojson_pagename = args["geojson"] or pagename | ||
local geojson_fullpagename = "GeoJson:" .. geojson_pagename | local geojson_fullpagename = "GeoJson:" .. geojson_pagename | ||
-- width/height | -- width/height | ||
| Zeile 143: | Zeile 141: | ||
mw.smw.subobject(o, id) | mw.smw.subobject(o, id) | ||
end | end | ||
end | |||
-- Karte | |||
local map_args = { -- gemeinsame settings | |||
["width"] = args["width"], ["height"] = args["height"], | |||
["zoom"] = args["zoom"], | |||
["enablefullscreen"] = "yes", ["resizable"] = "yes"} | |||
local display_map = false | |||
if wik.pageExists(geojson_fullpagename) then | |||
map_args["geojson"] = geojson_pagename | |||
table.insert(map_args, "") -- dummy / keine location | |||
display_map = true | |||
end | |||
if display_map then | |||
mw.logObject(map_args, "map_args") | |||
t = t .. frame:callParserFunction("#display_map", map_args) | |||
end | end | ||
-- bisherige Vorlagen-Karte | -- bisherige Vorlagen-Karte | ||
local karte_vorlage = "Karte/Legacy" | if not display_map then | ||
local karte_vorlage = "Karte/Legacy" | |||
if com.isTrue(args["Work"]) then | |||
-- args["Debug"] = "Ja" | karte_vorlage = karte_vorlage .. "/Work" | ||
-- args["Debug"] = "Ja" | |||
end | |||
mw.logObject(args, "args zur Vorlage " .. karte_vorlage) | |||
t = t .. frame:expandTemplate{title = karte_vorlage, args = args} | |||
end | end | ||
-- Box drum herum | -- Box drum herum | ||