question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pydeck_chart not showing different pydeck Views types

See original GitHub issue

Summary

When I try to show Pydeck map with view other than “MapView”, nothing happens, it does not change the view of the map.

Steps to reproduce

  1. Use code:
import streamlit as st
import pydeck as pdk

view_state = pdk.ViewState(latitude=0, longitude=0, zoom=2, min_zoom=2)
view = pdk.View(type="MapView", controller=True)

deck = pdk.Deck(views=[view],initial_view_state=view_state)
st.pydeck_chart(deck)
  1. Try to change view: view = pdk.View(type="OrbitView", controller=True) or view = pdk.View(type="OrthographicView", controller=True), or any other

Expected behavior:

It should change the view of the map.

Actual behavior:

It still shows the same “MapView” view of the map.

Is this a regression?

no

Debug info

  • Streamlit version: (0.70.0)
  • Python version: (3.7.7)
  • Using Conda? PipEnv? PyEnv? Pex? No
  • OS version: Linux Ubuntu 18.04
  • Browser version: Google Chrome, Version 86.0.4240.111

Additional information

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JovanNjcommented, Nov 25, 2020

Hi Fanilo,

Thank you very much for the explanation. Excellent, I will try the solution with embedding deck.to_html() to components.html() and I will send feedback here if we manage to deal with it.

Thanks again! Best, Jovan

1reaction
edur409commented, Nov 9, 2020

Hi Eveyone, this is a very good question I would like to know too. I’m plotting point clouds below the map (underground) and full rotations of the OrbitView type would be tremendously helpful to check distribution and patterns. For instance, concentration of hypocentres (points to origin of earthquake) could show the rupture plane or fault. Thanks in advance for any help or hint on how to achieve this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pydeck_chart not showing different pydeck Views types
When I try to show Pydeck map with view other than “MapView”, nothing happens, it does not change the view of the map....
Read more >
Gallery — pydeck 0.8.0b4 documentation
Configure one of the many deck.gl layers for rendering in pydeck. ... Currently, pydeck will not raise an error on incorrect or omitted...
Read more >
Deck — pydeck 0.6.1 documentation
class Deck (layers=None, views=[{'@@type': 'MapView', 'controller': true}], ... Pass Deck a Mapbox API token to display a basemap; see the notes below.
Read more >
How to display charts using pydeck library in Streamlit
Streamlit offers support to the pydek library and you can easily plot interactive spacial charts using "st.pydeck_chart". Syntax: st.
Read more >
DeckGL — Panel v0.14.1
mapbox_api_key (string): The MapBox API key if not supplied by a PyDeck object. ... Throttling timeouts (in milliseconds) for view state and hover...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found