Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
How does react-map-gl behave when sortByDepth for different popups is different

I am working with popup in react-map-gl, in the following documentation and regarding sortByDepth property, they mentioned that:

If true, the order of the popups will be dynamically rearranged to ensure that the ones anchored closer to the camera are rendered on top. Useful when showing multiple popups in a tilted map.

In my work I have many popups, I need to keep the popup which I clicked to be on the top, by making sortByDepth = false and returning the clicked popup as last element to be rendered between the popups I am able to do that, but still I need to keep the behavior of the other popups to be sorted by the depth, I tried to make a condition: if the current popup is not equal to the selected one, then sortByDepth equals to true, else it is false, but the behavior is not clear to me (it didn't work now the popup which I select will not be on the top but all the other popups will be above it).

so How does the rendering go if sortByDepth property differs from a one popup to another?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!