Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydeck example from docs is not interactive #3395

Closed
samsammurphy opened this issue Jun 9, 2021 · 1 comment · Fixed by #3522
Closed

pydeck example from docs is not interactive #3395

samsammurphy opened this issue Jun 9, 2021 · 1 comment · Fixed by #3522
Labels
type:bug Something isn't working

Comments

@samsammurphy
Copy link

Summary

The pydeck example in the docs does not work. It displays a static, non-interactive map.

Steps to reproduce

  1. save the code snippet (below) to app.py
  2. streamlit run app.py
  3. see browser
import streamlit as st
import pandas as pd
import numpy as np
import pydeck as pdk

df = pd.DataFrame(
np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],
columns=['lat', 'lon'])

st.pydeck_chart(pdk.Deck(
    map_style='mapbox://styles/mapbox/light-v9',
    initial_view_state=pdk.ViewState(
        latitude=37.76,
        longitude=-122.4,
        zoom=11,
        pitch=50,
    ),
    layers=[
        pdk.Layer(
        'HexagonLayer',
        data=df,
        get_position='[lon, lat]',
        radius=200,
        elevation_scale=4,
        elevation_range=[0, 1000],
        pickable=True,
        extruded=True,
        ),
        pdk.Layer(
            'ScatterplotLayer',
            data=df,
            get_position='[lon, lat]',
            get_color='[200, 30, 0, 160]',
            get_radius=200,
        ),
    ],
))

Expected behavior:

An interactive map as in this standalone streamlit app.

Actual behavior:

A static representation of the deck.gl map is loaded into the browser

Screenshot 2021-06-09 114529

This map ^ is not interactive and will get funky on resize

Screenshot 2021-06-09 114542

Is this a regression?

I do not know

Debug info

  • Streamlit, version 0.82.0
  • Python 3.8.5
  • Using Conda environment and pip install streamlit
  • Windows 10
  • Firefox and Chrome
@samsammurphy samsammurphy added type:bug Something isn't working status:needs-triage Has not been triaged by the Streamlit team labels Jun 9, 2021
@kmcgrady
Copy link
Collaborator

kmcgrady commented Jul 7, 2021

Hi @samsammurphy ! Thanks for the report. I think I see the issue. An error is being thrown on the frontend, so I have a fix in place for it. See #3522 It looks much better with this. Thanks for your help!

@kmcgrady kmcgrady removed the status:needs-triage Has not been triaged by the Streamlit team label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants