deck.gl-layers icon indicating copy to clipboard operation
deck.gl-layers copied to clipboard

wip: handle picking stroke of polygon layer

Open kylebarron opened this issue 3 months ago • 1 comments

It would be nice to allow picking of both the underlying SolidPolygonLayer and the PathLayer.

In https://github.com/geoarrow/deck.gl-layers/pull/113 we enable the picked index from the SolidPolygonLayer to be proxied to the consumer of the PolygonLayer. This works because the data structure of the PolygonLayer is exactly the same as the data structure of the SolidPolygonLayer. And the SolidPolygonLayer handles the index conversions when rendering MultiPolygons to screen (in invertOffsets).

The thing is, with the PathLayer we need to apply invertOffsets twice. The PathLayer returns a single index into the expanded PathLayer table. But we need to map that back into the original polygon table passed in by the user.

kylebarron avatar Mar 22 '24 21:03 kylebarron