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

No edit summary
No edit summary
വരി 7: വരി 7:
     local lon = args["lon"] or "0"  -- Default longitude
     local lon = args["lon"] or "0"  -- Default longitude
     local text = args["text"] or "Marker"  -- Default marker text
     local text = args["text"] or "Marker"  -- Default marker text
     local logo = args["logo"] or "File:63rd state kalolsavam logo.png"  -- Default logo image
     local logo = args["logo"] or "https://schoolwiki.in/File:63rd_state_kalolsavam_logo.png"  -- Default logo image (complete URL)


     -- Ensure lat and lon are numeric
     -- Ensure lat and lon are numeric
വരി 19: വരി 19:
     mapHtml:attr("id", "map")
     mapHtml:attr("id", "map")


     -- Get the correct logo URL (ensure it's a string)
     -- Check if the logo URL is valid (it should already be the complete URL)
     local logoUrl = mw.uri.fullUrl(logo)
     local logoUrl = logo -- Use the logo URL passed from the template directly
   
    -- Check if the logoUrl is nil and fallback to a default
    if logoUrl == nil then
        logoUrl = mw.uri.fullUrl("File:63rd state kalolsavam logo.png")  -- Fallback logo
    end


     local script = mw.html.create("script")
     local script = mw.html.create("script")
"https://schoolwiki.in/ഘടകം:Slippymap/sandbox" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്