Hi everyone, I have a problem, could you please help me?
I create a simple website, which has a selection box to select different regions (for example: California, and Washington). After users select a region, the map will automatically display that region. Below is my code, but it doesn’t meet my expectation, can you please help me in this case?
Thank you very much
import streamlit as st import pydeck as pdk region = st.selectbox("Select the region", ['California', 'Washington'], 1) if region == 'California': lat = 37.356491094481505 lng = -122.03289310426688 elif region == 'Washington': lat = 38.90651309591877 lng = -77.03904851937264 view_state = pdk.ViewState(latitude=lat, longitude=lng, zoom=11, pitch=45); deck = pdk.Deck(map_style='mapbox://styles/mapbox/dark-v9', initial_view_state=view_state); st.pydeck_chart(deck);