"ഘടകം:Slippymap/sandbox" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
No edit summary |
No edit summary |
||
| വരി 13: | വരി 13: | ||
lon = tonumber(lon) or 0 | lon = tonumber(lon) or 0 | ||
-- | -- Kartographer map rendering | ||
local mapHtml = mw.html.create("div") | local mapHtml = mw.html.create("div") | ||
mapHtml:addClass("kartographer-map") | mapHtml:addClass("kartographer-map") | ||
mapHtml:attr("style", "width: 100%; height: 400px;") | mapHtml:attr("style", "width: 100%; height: 400px;") | ||
mapHtml:wikitext('{{#invoke:Kartographer|map|' .. lat .. ',' .. lon .. '|zoom=13|markers=' .. lat .. ',' .. lon .. '|' .. text .. '}}') | |||
-- | -- Logo as an image | ||
local logoHtml = mw.html.create("div") | local logoHtml = mw.html.create("div") | ||
logoHtml:addClass("logo") | logoHtml:addClass("logo") | ||
| വരി 24: | വരി 25: | ||
logoHtml:wikitext('[[File:' .. logo .. '|100px|link=]]') | logoHtml:wikitext('[[File:' .. logo .. '|100px|link=]]') | ||
-- | -- Return the map and logo HTML | ||
return tostring(mapHtml) .. tostring(logoHtml) | return tostring(mapHtml) .. tostring(logoHtml) | ||
end | end | ||
return p | return p | ||