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] Picking for custom layers should be optional and shouldn't log warnings #9283

Open
7 tasks
gregtayl opened this issue Dec 7, 2024 · 0 comments
Open
7 tasks
Labels

Comments

@gregtayl
Copy link

gregtayl commented Dec 7, 2024

Description

If you create a custom layer (inheriting from Layer) but do not include the 'picking' module you get a warning: "hook.js:608 luma.gl: Module picking not found". This is caused by picking logic in the base Layer class, specifically the call in _postUpdate function to: setShaderModuleProps({picking}).

Ideally no warning should be raised for custom layers that don't require interactivity/picking. One workaround is to override the setShaderModuleProps function in your custom layer to intercept/swallow this call, however, it seems like there should be a way to disable picking altogether that would avoid all of picking related logic/methods/etc.. Perhaps moving the picking logic to a higher-level PickableLayer class instead of including it in the base Layer class might be another way to approach this?

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS

Expected Behavior

Ideally no warnings would be logged when creating a custom layer that doesn't require picking. Superfluous warnings make it easy for other important warnings to be overlooked.

Steps to Reproduce

Create a custom layer, but do not include the picking module.

Environment

  • Framework version: 9.0.36
  • Browser: any
  • OS: any

Logs

No response

@gregtayl gregtayl added the bug label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant