Skip to content

map.save() to support an option to export leaflet dependencies (js/css/icons) as inline base64 uris #1985

@prusswan

Description

@prusswan

Is your feature request related to a problem? Please describe.

folium maps exported as html still depend on external leaflet dependencies (either from internet or on relative paths - manual modification is needed)

Describe the solution you'd like

Something similar to knit in RStudio (which produces the html with the inlined resources). I believe the R leaflet package is self-contained (it contains leaflet's resources), so for this to work in the same manner in folium, additional options to override default_js/default_css may be necessary (i.e. to point them to relative/static paths).

Describe alternatives you've considered

Out of various leaflet wrappers, RStudio's implementation is the closest.

Additional context

(Could attach one of html files created through RStudio's leaflet, if anyone needs it)

Implementation

Possibly, just to gauge the interest for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature request or idea about how to make folium better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions