Pydeck_chart not showing different pydeck Views types


First, I would like to thank you in the excellent platform. Our team was using Streamlit for the last six months, and we are very happy with the ease of the app creation, and frequency of the streamlit update, excellent job!
We run into the problem with using Streamlit pydeck for the map visualization. I posted this problem three weeks ago on github, but I still didn’t get any feedback (issue #2302), so I just wanted to check if I could get some feedback on the issue, I would appreciate it very much. Thanks!

Description of the problem:

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)
  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?


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

Hi @Jovan_Njegic, welcome to the forum :slight_smile:

Hmmm I looked into it a bit, it seems Streamlit doesn’t use the views part of the pydeck object and renders a StaticMap by default.

I’ll write something on the GH issue. Thanks for reporting!


Hi @andfanilo,

Thank you very much for the quick response. I will try some solutions you proposed on GH, and I’ll send feedback. Anyone interested, feel free to follow it at GH.