Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import streamlit as st
- import folium
- from streamlit_folium import folium_static
- def main():
- st.title("Solar Map :mostly_sunny:")
- # Initialize the map
- m = folium.Map(location=[21.502771, 39.247194], zoom_start=18)
- # Add a click event handler to the map
- m.add_child(folium.ClickForMarker("<b>Lat: </b> ${lat}<br/><b>Lon: </b> ${lng}<br><b>Altitude:</b> 10.00 m"))
- # Display the map using folium_static
- folium_static(m)
- if __name__ == "__main__":
- main()
Add Comment
Please, Sign In to add comment