ShapeSource onPress when PointAnnotation below not working #1093
Replies: 1 comment
|
For now I have decided to use the same function in onSelected and onDeselected, which does the job well enough |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I have an array of PointAnnotations with details of certain spots, displayed when the zoom level is large. I control it with state boolean.
I would probably use MarkerView, but it is super slow and laggy compared to PointAnnotation.
When the zoom level is smaller, I use ordinary ShapeSource with clustering. In the Source, I have added a CircleLayer to display nearly-transparent (full transparent won't work) circle (only in large zoom as well, using filter), in the same spot where my annotation is, to capture the click event and navigate to a different view.
The approach generally works without the PointAnnotation - the circles are correctly displayed, the click is captured and behaves as expected with one caveat.
If I display the Pointannotation, the event is only captured around the PointAnnotation, but not over it. The order in MapView does not seem to matter (the circles are rendered on top of PointAnnotations regardless of order anyway).
Below is screenshot of the setup:

Is this a bug or expected behavior? For the record, I am using v11 alpha 10 version with new architecture + react native 0.81.1.
All reactions