You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On running the example "bindings/pydeck/examples/03 - Event handlers and data selection in pydeck.ipynb", I am not able to get any output back, on_hover or on_click. Its says "deck: Picked non-existent layer. Is picking buffer corrupt?".
Flavors
Script tag
React
Python/Jupyter notebook
MapboxOverlay
GoogleMapsOverlay
CartoLayer
ArcGIS
Expected Behavior
No response
Steps to Reproduce
import pydeck as pdk
import pandas as pd
from ipywidgets import HTML
Description
On running the example "bindings/pydeck/examples/03 - Event handlers and data selection in pydeck.ipynb", I am not able to get any output back, on_hover or on_click. Its says "deck: Picked non-existent layer. Is picking buffer corrupt?".
Flavors
Expected Behavior
No response
Steps to Reproduce
import pydeck as pdk
import pandas as pd
from ipywidgets import HTML
text = HTML(value='Move the viewport')
SCREEN_GRID_LAYER_DATA = (
"https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-bike-parking.json" # noqa
)
df = pd.read_json(SCREEN_GRID_LAYER_DATA)
Define a layer to display on a map
layer = pdk.Layer(
"ScreenGridLayer",
df,
pickable=True,
opacity=0.8,
cell_size_pixels=50,
color_range=[
[0, 25, 0, 25],
[0, 85, 0, 85],
[0, 127, 0, 127],
[0, 170, 0, 170],
[0, 190, 0, 190],
[0, 255, 0, 255],
],
get_position="COORDINATES",
get_weight="SPACES",
)
def filter_by_viewport(widget_instance, payload):
text.value=str(payload)
Set the viewport location
view_state = pdk.ViewState(latitude=37.7749295, longitude=-122.4194155, zoom=11, bearing=0, pitch=0)
Render
r = pdk.Deck(layers=[layer], initial_view_state=view_state)
r.deck_widget.on_hover(filter_by_viewport)
display(text)
r.to_html("screengrid_layer.html")
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: