模块:Map
此模块的文档可以在模块:Map/doc创建
local p = {} function p.render(frame) if frame:getParent() ~= nil then frame = frame:getParent() end local mapDiv = mw.html.create("div") mapDiv:addClass("interactive-map"):attr({ id = "imap-" .. os.clock() * 1e9, ["data-mapSource"] = frame.args["map"], ["data-markers"] = frame.args["markers"], ["data-initialZoom"] = frame.args["initialzoom"], ["data-initialLocX"] = frame.args["initiallocx"], ["data-initialLocY"] = frame.args["initiallocy"], ["data-tileTemplate"] = frame.args["tiletemplate"], ["data-tileSize"] = frame.args["tilesize"], ["data-tileBounds"] = frame.args["tilebounds"], ["data-tileZoom"] = frame.args["tilezoom"] }):cssText(frame.args["style"]):allDone() return tostring(mapDiv) end return p