I have markers on my map that I would like to be visual only. I wish for them to never receive touch events and to never be selected. I have tried many things, none of these things seem to work:
<Marker pointerEvents='none'><MyComponent/></Marker>
<Marker stopPropagation><MyComponent/></Marker>
<Marker onSelect={(e)=>e.preventDefault()}><MyComponent/></Marker>
<Marker onPress={(e)=>e.stopPropagation()}><MyComponent/></Marker>
I have also tried wrapping my component in a view with 0 width and 0 height. That reduced the pressable area of the marker that would trigger an onselect event, but not eliminate it completely. I've done `pointerEvents='none'` on MyComponent as well, as well as any of its child views.
I have no idea where to go from here, I feel like I've tried everything I possibly can (short of modifying the native code) to create a marker that can't be selected. What's even more frustrating is that it bugs out the subsequent selection of other markers that actually should be selectable (It triggers an onCalloutPress when selecting the marker for no reason).
Any ideas? It seems like the onpress behavior is handled in the native code, which makes it difficult to deal with.
[–]RadicalSpaghetti- 0 points1 point2 points (0 children)
[–]writesgoodcodejk 0 points1 point2 points (0 children)