Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Make tooltip persistent on marker
posted

Hi

How can I make a persistent tooltip until user focuse on marker with mouse (just by clicking)

like this: https://www.mapbox.com/mapbox.js/example/v1.0.0/custom-marker-tooltip/

Thank you

Nicolas

Parents
No Data
Reply
  • 8421
    Suggested Answer
    posted

    Hello Nicolas,

    One way you could implement this is by creating a custom template for the markers on the map. You could have a value that you store when an item is clicked on and then in the template check to see if the current item that is being rendered. If it is, then render a different template than you normally would.

    I have modified one of our samples to demonstrates how this look, which you can find on jsFiddle here. Please let me know if this approach meets your requirements.

Children
No Data