Hi all,
I’m drawing a map using Pydeck and it works great, but i’m looking for a way that the map won’t be square but a rectangle. or alternatively, drawing the map giving 4 coordinates, one for each corner.
thanks!
Hi all,
I’m drawing a map using Pydeck and it works great, but i’m looking for a way that the map won’t be square but a rectangle. or alternatively, drawing the map giving 4 coordinates, one for each corner.
thanks!
Hi @yehren -
The Deck
class object takes height
and width
, do those accomplish what you are trying to do?
https://pydeck.gl/deck.html#deck
Best,
Randy
Thanks @randyzwitch,
Unfortunately i’m changing both height and width but it doesn’t make any change.
I’m developing with PyCharm with Streamlit version 0.69. maybe it is related somehow to the version but when i’m using the most updated version my app get stuck quickly…
Here is a piece of my code which draw the map:
pp = pdk.Deck(
initial_view_state=viewstate,
height=1000,
width='100%',
map_provider='mapbox',
# api_keys='MAPBOX_API_KEY',
map_style="mapbox://styles/mapbox/light-v9",
#map_style=pdk.map_styles.SATELLITE,
layers=[slayer, tlayer],
tooltip=tooltip
)
deckchart = st.pydeck_chart(pp, use_container_width=True)
maybe there is another flag to enable? or any other sujestion?
Thanks!
Yair
In this case, I think your issue is because you are both using height
/width
and use_container_width
. So your map will be overridden to the column width.
What happens if you do height=1000
and width = 1500
?
I tried to set use_container_width=True or False and changed height and width to 1000 and 1500 and to other values but the map insist to stay in the exact same size…
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.