Pydeck Map points location not correct

I am running my app locally, but it seems like the points didnโ€™t render in streamlit dashboard correctly. The first plot is rendered in streamlit and the second plot is rendered by pydeck directly. The codes are same.

I use pydeck 0.9.1 and streamlit 1.36.0.
I attached the code below for checking.

selected_layers = pdk.Layer(
        "ScatterplotLayer",
        data=tbl,
        pickable=True,
        opacity=0.8,
        stroked=True,
        filled=True,
        radius_scale=6,
        radius_min_pixels=5,
        radius_max_pixels=100,
        line_width_min_pixels=0.1,
        get_position=["longitude", "latitude"],
        get_radius=1000,
        get_fill_color=[201, 100, 207],
        get_line_color=[211, 211, 211],
    ),
view_state = pdk.ViewState(
    latitude=41.7749295, 
    longitude=-100.4194155, 
    zoom=4, 
    bearing=0, 
    pitch=0, 
    width='100%', 
    height=700
)
r = pdk.Deck(
        layers=selected_layers, 
        initial_view_state=view_state, 
        map_provider="mapbox", 
        map_style="light",
        api_keys = mapbox_access_token

    )

Hey @czzzzzz, I saw your flag that the question is solved. Please use flags to indicate spam or content that violates our forumโ€™s guidelines โ€“ if your question is solved, you can simply update the original post or add a reply (ideally sharing how you solved the problem for future readers who are encountering the same issue :pray:)

1 Like