How to add opacity control of imageoverlayer?

79 Views Asked by At

I see we can add an image on map like this:

import folium

m = folium.Map([37, 0], zoom_start=1, tiles="stamentoner")

folium.raster_layers.ImageOverlay(
    image="https://upload.wikimedia.org/wikipedia/commons/f/f4/Mercator_projection_SW.jpg",
    name="I am a jpeg",
    bounds=[[-82, -180], [82, 180]],
    opacity=1,
    interactive=False,
    cross_origin=False,
    zindex=1,
    alt="Wikipedia File:Mercator projection SW.jpg",
).add_to(m)

folium.LayerControl().add_to(m)

How to add a control slider to change the opacity of the layer (overlayed image)? I found this leaflet plugin which do the same thing.

enter image description here

0

There are 0 best solutions below