Skip to content

onHover for member of CompositeLayer is not called? #5497

Answered by Pessimistress
cneumann asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this is intentional. The sub layers are considered internal to a composite layer's implementation and are by default not exposed to the end user. For example, if you create a TileLayer that renders a GeoJsonLayer that renders scatterplot and polygon layers, when you specify onHover on the TileLayer, it is called only once per mouse move, instead of 3 times bubbling up from the lowest level.

When you implement your own layer class, a picking event is handled via the getPickingInfo method, as explained here: https://deck.gl/docs/developer-guide/custom-layers/picking#event-propagation This method on the CompositeLayer receives an additional sourceLayer argument that indicates where the …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cneumann
Comment options

Answer selected by cneumann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants