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

[Bug] Rendering freezes after first interaction #7590

Closed
1 of 6 tasks
ctlbau opened this issue Jan 20, 2023 · 6 comments
Closed
1 of 6 tasks

[Bug] Rendering freezes after first interaction #7590

ctlbau opened this issue Jan 20, 2023 · 6 comments
Assignees

Comments

@ctlbau
Copy link

ctlbau commented Jan 20, 2023

Description

Setting a custom tooltip makes the interaction freeze

Flavors

  • React
  • Python/Jupyter notebook
  • MapboxLayer
  • GoogleMapsOverlay
  • CartoLayer
  • DeckLayer/DeckRenderer for ArcGIS

Expected Behavior

Map interaction

Steps to Reproduce

Here are the isochrones from graphhoper
sample.csv

Here is the layer

isochrone_boundaries = pdk.Layer(
    "GeoJsonLayer",
    data=gdf,
    stroked=True,
    filled=True,
    line_width_min_pixels=2,
    pickable=True,
    get_fill_color=[0, 255, 255, 110],
    get_radius=1
)

Viewport

ctr = (-3.6840605, 40.4142142)

viewport = pdk.ViewState(**{
    "longitude": ctr[0],
    "latitude": ctr[1],
    "zoom": 15,
    "pitch": 0,
    "bearing": 0
})

And deck

d = pdk.Deck(
    [isochrone_boundaries],
    initial_view_state=viewport,
    # tooltip={'text': f'{isotime} minute isochrone'},
    map_style='mapbox://styles/mapbox/dark-v10',
    map_provider='mapbox',
    api_keys={'mapbox': MAPBOX_API_KEY}
    )

d.to_html('iso.html')

Running like so, with pickable=True, displays the bucket data -although it doesn't seem to pick on the different buckets either; but turning on the tooltip freezes the map.

Environment

  • Framework version:
  • Browser:
  • OS: macOS (x86_64-apple-darwin21.4.0)
    CPU: 12 × Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

Logs

No response

@ctlbau ctlbau added the bug label Jan 20, 2023
@ajduberstein ajduberstein self-assigned this Jan 20, 2023
@ctlbau
Copy link
Author

ctlbau commented Feb 14, 2023

Hi, any news on this front? I recently updated to m series mac and the problem persists. Running your most basic example of an isochrone over Berlin freezes over when the tooltip is on.
image

@Pessimistress
Copy link
Collaborator

I'm not familiar with pydeck, but it would help if you can check the browser's JavaScript console for any errors.

@ctlbau
Copy link
Author

ctlbau commented Feb 18, 2023

Hi, yes -sorry- I should have provided these earlier. It seems Plugin '@deck.gl/jupyter-widget:plugin' failed to activate.
The Jupyter server also reports that [IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
Apparently this last message is harmless. However the closest bug I could find to previous was this one, fixed by updating kepler.gl bindings. So maybe I should revert to a previous version of jupyter or its extensions or both?

@Jesus89
Copy link
Collaborator

Jesus89 commented Apr 1, 2023

Hi, I have successfully run your example with pydeck 0.8.0 and Jupyter notebook 6.4.10. The only difference is that I used the default basemap instead the Mapbox one. Please, check this section in the documentation to verify that pydeck extension is properly enabled.

Regarding the ordering of the features for the tooltips, I realized that it depends on the order in the dataframe, so with this line you can make it work:

gdf = gdf.sort_values(by=['bucket'], ascending=False)

This is an example showing both values in the tooltip:

d = pdk.Deck(
    [isochrone_boundaries],
    initial_view_state=viewport,
    tooltip={
        'html': '<b>Unnamed: 0</b> {Unnamed: 0}<br><b>bucket</b> {bucket}',
        'style': {
            'color': 'white'
        }
    })

isolines-tooltip

@Jesus89 Jesus89 self-assigned this Apr 1, 2023
@vdelacruzb
Copy link
Collaborator

Hi @dcarrot,
Could you tell us if the proposed solution worked for you? In case we can provide more support. Thanks.

@vdelacruzb vdelacruzb self-assigned this Aug 25, 2023
@Pessimistress
Copy link
Collaborator

Closing for inactivity

@Pessimistress Pessimistress closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants