15.978
Bearbeitungen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 34: | Zeile 34: | ||
args["box"] = args["box"] or "Ja" | args["box"] = args["box"] or "Ja" | ||
args["zoom"] = args["zoom"] or "16" | args["zoom"] = args["zoom"] or "16" | ||
args["form"] = args["form"] or "nein" | |||
-- geojson-Angabe auswerten | |||
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 | ||
local geojson_url = "{{canonicalurl:" .. geojson_fullpagename .. "}}" | |||
-- width/height | -- width/height | ||
| Zeile 147: | Zeile 151: | ||
["width"] = args["width"], ["height"] = args["height"], | ["width"] = args["width"], ["height"] = args["height"], | ||
["enablefullscreen"] = "yes", ["resizable"] = "yes"} | ["enablefullscreen"] = "yes", ["resizable"] = "yes"} | ||
-- geojson | -- geojson | ||
if wik.pageExists(geojson_fullpagename) then | if wik.pageExists(geojson_fullpagename) then | ||
| Zeile 170: | Zeile 173: | ||
end | end | ||
end | end | ||
end | end | ||
end | end | ||
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") | ||
t = t .. frame:callParserFunction("#display_map", map_args) .. | t = t .. frame:callParserFunction("#display_map", map_args) | ||
if args["geojson"] ~= nil and args["geojson"] ~= map_args["geojson"] then | |||
t = t .. "<small>Karte [" .. geojson_url .. " " .. args["geojson"] .. "] nicht gefunden</small>" | |||
end | |||
else | else | ||
if com.isTrue(args["form"]) then | |||
t = t .. "Positionsangabe fehlt oder<br>fehlende Karte<br>" .. geojson_fullpagename .. "<br><br>Bitte Position in Formular eintragen oder" | |||
if com.isTrue(args[" | else | ||
t = t .. "Breiten-/Längengrad (lat/lon) fehlt,<br>Objekt-Lokation (location) fehlt oder<br>fehlende Karte<br>" .. geojson_fullpagename .. "<br>" | |||
end | end | ||
t = t .. "<br>[" .. geojson_url .. " Hier klicken zum Anlegen der Karte<br>" .. geojson_fullpagename .. "].<br>Siehe auch [[Hilfe:Karten]]<br> " | |||
kategorien["Ohne Position"] = true | |||
end | end | ||