Hi, I had a blast with Streamlit over the weekend! Thanks for making this available as Open Source
I am trying to get either PolygonLayer and/or GeoJsonLayer working (I already have ScatterplotLayer working), but in both cases I get an error saying that the layer is not supported, just don’t know where it comes from.
The error is below, and the source code that triggers follows it.
Am I missing something or this is to be implemented? Is the data supposed to be a dataframe too? if so, what’s the right format?
Error: Unsupported layer type "geojsonlayer"
value/<@http://localhost:8502/static/js/20.7c756591.chunk.js:1:3846
tr</o.prototype.map/<@http://localhost:8502/static/js/7.98b70499.chunk.js:1:98766
Tt@http://localhost:8502/static/js/7.98b70499.chunk.js:1:88251
tr</o.prototype.map@http://localhost:8502/static/js/7.98b70499.chunk.js:1:98705
...
e/<@http://localhost:8502/static/js/main.e804509a.chunk.js:1:50185
l@http://localhost:8502/static/js/7.98b70499.chunk.js:1:1247205
u/i._invoke</<@http://localhost:8502/static/js/7.98b70499.chunk.js:1:1246994
x/</e[t]@http://localhost:8502/static/js/7.98b70499.chunk.js:1:1247627
n@http://localhost:8502/static/js/7.98b70499.chunk.js:1:48998
s@http://localhost:8502/static/js/7.98b70499.chunk.js:1:49201
the code used is more or less this:
vp_layer = {'type':'GeoJsonLayer',
'data':{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-122.5312042236328,
37.71859032558816
],
[
-122.3495864868164,
37.71859032558816
],
[
-122.3495864868164,
37.8065289741725
],
[
-122.5312042236328,
37.8065289741725
],
[
-122.5312042236328,
37.71859032558816
]
]
]
}
}
]
},
#'getPolygon':[tl,tr,br,bl,tr],
# 'stroked':True,
# 'wireframe':True
'getLineColor': [80, 80, 80],
'getLineWidth': 1,}
...
st.deck_gl_chart(viewport={'latitude':(viewport[0]+viewport[2])/2,
'longitude':(viewport[1]+viewport[3])/2,
'zoom':bbox['zoom']-2,
'width':width,
'height':height},
layers=[vp_layer])