pythonfolium

Hover in popup in Folium


With a simple example like this:

import folium

map_1 = folium.Map(location=[45.372, -121.6972], zoom_start=12,
                   tiles='Stamen Terrain')
folium.Marker([45.3288, -121.6625], popup='Mt. Hood Meadows').add_to(map_1)
map_1

Can you make a popup appear just by putting the mouse up? Is this possible with folium?


Solution

  • UPDATED ANSWER

    It turns out that this functionality has been put into folium's codebase.

    Simply add the tooltip argument, like so:

    import folium
    
    map_1 = folium.Map(location=[45.372, -121.6972], zoom_start=12, tiles='Stamen Terrain',
                       tooltip = 'This tooltip will appear on hover' # THIS
                      )
    folium.Marker([45.3288, -121.6625], popup='Mt. Hood Meadows').add_to(map_1)
    map_1