In [1]:
import os
import folium

print(folium.__version__)
0.5.0+27.g2d457b0.dirty

How to use ImageOverlay

It may happen that you want to draw an image on you map. Here are example on how to do that.

Using an image from disk

If you have a static image file on your disk, you can simply draw it on the map.

In [2]:
merc = os.path.join('data', 'Mercator_projection_SW.png')

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

img = folium.raster_layers.ImageOverlay(
    name='Mercator projection SW',
    image=merc,
    bounds=[[-82, -180], [82, 180]],
    opacity=0.6,
    interactive=True,
    cross_origin=False,
    zindex=1,
)

folium.Popup('I am an image').add_to(img)

img.add_to(m)

folium.LayerControl().add_to(m)

m.save(os.path.join('results', 'ImageOverlay_0.html'))

m
Out[2]: