"ഘടകം:Slippymap/sandbox" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
No edit summary |
No edit summary |
||
| വരി 13: | വരി 13: | ||
lon = tonumber(lon) or 0 | lon = tonumber(lon) or 0 | ||
-- Generate the HTML | -- Generate the map HTML using Kartographer | ||
local mapHtml = mw.html.create("div") | local mapHtml = mw.html.create("div") | ||
mapHtml:addClass(" | mapHtml:addClass("kartographer-map") | ||
mapHtml:attr("style", "width: 100%; height: 400px;") | mapHtml:attr("style", "width: 100%; height: 400px;") | ||
-- | -- Generate the logo HTML | ||
local logoHtml = mw.html.create("div") | |||
logoHtml:addClass("logo") | |||
logoHtml:attr("style", "position: absolute; bottom: 10px; left: 10px;") | |||
logoHtml:wikitext('[[File:' .. logo .. '|100px|link=]]') | |||
-- Returning the HTML output with both map and logo | |||
return tostring(mapHtml) .. tostring(logoHtml) .. | |||
'\n{{#invoke:Kartographer|map|' .. lat .. ',' .. lon .. '|' .. text .. '}}' | |||
end | end | ||
return p | return p | ||