Skip to content

Improve picking with multiple layers (snappy picking) #2762

Description

@rubenthoms

Problem

When working with overlapping layers that have very different visual densities (e.g. thin foreground geometry over a dense background), the current picking behavior makes it difficult to achieve intuitive (“snappy”) interaction, even with pickingRadius enabled.

Example scenario

Foreground layer: thin PathLayer polylines (interaction target) (e.g. WellsLayer)
Background layer: map (BitmapLayer or MapLayer)

Desired behavior:

Larger effective picking radius for the thin foreground layer
Smaller (or default) picking radius for the background layer

Actual behavior:

Picking radius is applied globally (screen-space)
When hovering near but not directly over the polyline:
The background layer is picked instead
Even if a larger radius is desired for the foreground layer

Strategy

  1. Look at deck.gl examples and see if they have the same issue anywhere.
  2. Create a GitHub issue in their repo that potentially references the problems in their examples.
  3. Await their answer and suggestion - either continue with that or start our own investigation of possibilities, for instance:
  • onHover override with multi-picking and prioritization
  • LayerExtension? - probably fragile
  • Invisible hit layer with picking and disabled picking for main/visible layer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions