vinostroud / PDM_App_Two

MIT License
1 stars 0 forks source link

Add pop up when cursor hovers over selected map region #10

Closed vinostroud closed 9 months ago

vinostroud commented 9 months ago

After an empire is selected, when the cursor hovers over the selected map area, a pop up should show the name of the empire and the start/end date it was active

first draft of code block is as follows: [CODE BLOCK DELETED] '''

Zaubeerer commented 9 months ago

Seems pretty advanced to me, so maybe rather v1.0 functionality?

vinostroud commented 9 months ago

Nah, very easy in Folium and I already have the code for an example:

tooltip = 'This is a placeholder tooltip'

#geojson overlay
folium.GeoJson(geojson_path,
               popup='Placeholder Text',
               tooltip=tooltip).add_to(m)

Screenshot 2024-01-15 at 11 36 39 AM

vinostroud commented 9 months ago

Project is much easier now that I determined to use folium with streamlit.

Zaubeerer commented 9 months ago

Awesome!

Great you found that out 💪