Hi all!
I’m trying to visualize with st.pydeck_chart some data that has grographical coordinates.
This is the code I’m using right now:
st.pydeck_chart(pdk.Deck(
map_style="mapbox://styles/mapbox/light-v9",
initial_view_state={
"latitude": lat_mid,
"longitude": lon_mid,
"zoom": 12,
"pitch": 0,
},
layers=[
pdk.Layer(
"HexagonLayer",
data=places,
get_position=["lon", "lat"],
radius=30,
elevation_scale=4,
elevation_range=[0, 0],
pickable=True,
extruded=True,
),
]
))
The map initially works fine but after some seconds it freezes and I cannot move it or zoom. In addition, I’m using elevation_range[0,0] because with an higher range it freezes even quicker.
When I use “HeatmapLayer” the map does not freeze but it lags.
I’m using Google Chrome that gives me this error:
Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.e.createTooltip [as getTooltip] (20.69e2e88c.chunk.js:1)
at e.value (9.bbbab3d1.chunk.js:2)
at e.value (9.bbbab3d1.chunk.js:2)
at e.value (9.bbbab3d1.chunk.js:2)
at e.value (9.bbbab3d1.chunk.js:2)
at e.value (9.bbbab3d1.chunk.js:2)
at t (9.bbbab3d1.chunk.js:2)
Streamlit version: 0.70
Does anyone know hot to solve this problem?
Thank you