You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I'm trying to make my custom markers to not overlap when there is a collide between them.
I tried to play setting iconAllowOverlap: true and textAllowOverlap: true but the text is overlapping anyway.
After some research, I figured out that you can choose the index priority playing with the symbolSortKey property.
This is my specific use case & the code that I wrote for this purpose.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there, I'm trying to make my custom markers to not overlap when there is a collide between them.
I tried to play setting iconAllowOverlap: true and textAllowOverlap: true but the text is overlapping anyway.
After some research, I figured out that you can choose the index priority playing with the symbolSortKey property.
This is my specific use case & the code that I wrote for this purpose.
This is the approach that I've made to do it using symbolSortKey, however, when I run the App I get this error:
Error while updating property ''reactStyle' of a view managed by: RCTMGLSymbolLayer null
Value for value cannot be cast from String to Double.
If I comment the line symbolSortKey: '{symbolSortKey}', it just works fine (but with the overlap issue).
And this is the desired behavior (Keep marker & text behind markers with a higher priority):
And I think that this is because I'm doing something wrong at receiving symbolSortKey on markerStyle Object.
Could anyone help me to find a solution for this specific use case?
Thank you in advance!
Expected behavior
Markers should render without overlapping their respective textFields
Actual behavior
App Crash with the error mentioned above because of symbolSortKey.
Versions:
Beta Was this translation helpful? Give feedback.
All reactions