[Bug]: Map markers don't always render in the same order #2560
Labels
bug
Something isn't working
good first issue
Good for newcomers
to-review
Evidence team to review
ui/data
Charts, tables and other viz
Describe the bug
When using a
BaseMap
with multipleBubbles
/Points
, the components don't always mount in the same order, and thus theCircleMarkers
added to the map aren't consistently ordered.Steps to Reproduce
Load the BaseMap story a couple times and see that sometimes the red dots are underneath the blue bubbles, sometimes they are on top.
Logs
No response
System Info
No response
Severity
annoyance
Additional Information, or Workarounds
Frustratingly,
CircleMarker
doesn't havezIndexOffset
likeMarker
hasI think the best solution here is to
map.createPane
for eachBubbles
/Points
component that is used, and then adjust the z-index of the panes based on their appearance in the DOM (not sure how to do this, but a hacky solution could be rendering some invisible divs and checking their order).The text was updated successfully, but these errors were encountered: