"ഘടകം:Slippymap/sandbox" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം

No edit summary
No edit summary
വരി 13: വരി 13:
     lon = tonumber(lon) or 0
     lon = tonumber(lon) or 0


     -- Generate the map HTML using Kartographer
     -- 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 .. '}}')


     -- Generate the logo HTML
     -- 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=]]')


     -- Returning the HTML output with both map and logo
     -- Return the map and logo HTML
     return tostring(mapHtml) .. tostring(logoHtml) ..
     return tostring(mapHtml) .. tostring(logoHtml)
          '\n{{#invoke:Kartographer|map|' .. lat .. ',' .. lon .. '|' .. text .. '}}'
end
end


return p
return p
"https://schoolwiki.in/ഘടകം:Slippymap/sandbox" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്