awacke1 commited on
Commit
abd3e56
·
1 Parent(s): 6c3b759

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,8 +1,7 @@
1
  import streamlit as st
2
  import folium
3
  from streamlit_folium import folium_static
4
- from folium import PolyLine # add PolyLine
5
- from folium.plugins import MarkerCluster # add MarkerCluster
6
 
7
  # Define mythological places data for Iceland
8
  mythological_places = [
@@ -32,8 +31,8 @@ for place in mythological_places:
32
 
33
  # Add PolyLine for paths between markers with animation
34
  locations = [place[1:3] for place in mythological_places]
35
- path = PolyLine(locations, color='blue', opacity=0.8, weight=5, smooth_factor=0.5).add_to(m)
36
- path.add_child(folium.plugins.PolyLineTextPath(text='\u25BA', repeat=True, offset=6, attributes={'fill': 'blue', 'font-weight': 'bold', 'font-size': '12'}))
37
 
38
  folium_static(m)
39
 
 
1
  import streamlit as st
2
  import folium
3
  from streamlit_folium import folium_static
4
+ from folium.plugins import MarkerCluster
 
5
 
6
  # Define mythological places data for Iceland
7
  mythological_places = [
 
31
 
32
  # Add PolyLine for paths between markers with animation
33
  locations = [place[1:3] for place in mythological_places]
34
+ path = folium.PolyLine(locations, color='blue', opacity=0.8, weight=5, smooth_factor=0.5).add_to(m)
35
+ folium.plugins.PolyLineTextPath(polyline=path, text='\u25BA', repeat=True, offset=6, attributes={'fill': 'blue', 'font-weight': 'bold', 'font-size': '12'}).add_to(path)
36
 
37
  folium_static(m)
38