Replies: 1 comment 2 replies
-
@kubapelc is working on improving hit detection due to the globe work he is doing. If you want to pursue this I would recommend creating a short design document to align everyone on what you plan to achieve and how. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have a symbol layer with a custom SDF icon in it. I am listening for mouse events on this layer to detect hover, to change the halo color and width.
The thing is, hit testing happens using the bounding box of the displayed image. This is a bit problematic when the symbol is not rectangular, or if it is rotated.
It's possible to add a function that will improve hit detection to accommodate the rotation, but I was wondering if there are some existing method / doc to do this kind of things. Also, I guess with SDF it could be possible to enable precise hit testing depending on the shape directly.
Thank you for you help, awesome library!
Beta Was this translation helpful? Give feedback.
All reactions