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

114
Views
Way to keep the react leaflet tooltip open only when mouse is over tooltip or marker?

I am using react leaflet tooltip for a mapbox map. I'm having a lot of trouble trying to keep react leaflet tooltip open when the mouse is over either the marker or the tooltip itself? I want to be able to open on hover and then click on something inside the tooltip, and I want to close when the mouse leaves the marker or the tooltip.

So if the mouse is in the red then the tooltip is open, and if it is not, then the tooltip is closed.

enter image description here

Any pointers appreciated

I tried what was available in the api https://leafletjs.com/SlavaUkraini/reference.html#tooltip, but I think there may be more customization I don't have the expertise to build may be needed to pull off this behavior.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

One way to do it is to not set it to close when the mouse leaves.

Then it will be up to the user to either click on the map or click "close" to close the popup.

If any other markers are hovered that show popups then the original one will be automatically closed.

about 4 years ago · Juan Pablo Isaza Report
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!