1

I am using heatmap layer from pydeck. It works find when I do map.show() however when I save it to html file using map.to_html("name.html") it shows heatmap without mapbox on the background.

Here is my code:

layer = pdk.Layer(
    "HeatmapLayer",
    df,
    get_position="[st_lng, st_lat]"
) 
center = [126.962351, 37.398356] 
view_state = pdk.ViewState( 
    longitude=center[0], 
    latitude=center[1],
    zoom=10
)
map = pdk.Deck(layers=[layer],
             initial_view_state=view_state,
             mapbox_key=MAPBOX_API_KEY,
             map_style="mapbox://styles/mapbox/streets-v11"
)

map.to_html("a.html")
# r.show()

outputs: 'C:\\Users\\name\\Desktop\\name\\a.html'

Thanks in advance!

1 Answer 1

1

I was using Pydeck version 0.2, updating it to version 0.5.0 solved my problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.