Leaflet.label icon indicating copy to clipboard operation
Leaflet.label copied to clipboard

Timeout for marker mouseout

Open davidcalhoun opened this issue 10 years ago • 1 comments

It would be really nice to be able to specify a timeout on labels, so they don't close immediately after mousing away. This can be done with a setTimeout, and a clearTimeout for the case when there shouldn't be any delay (such as mousing directly over another marker).

Example:

marker.bindLabel("Test marker!", {
    closeDelay: 500  // 500 millisecond delay after mousing away before label closes
}).addTo(map);

davidcalhoun avatar Dec 17 '13 22:12 davidcalhoun

Sorry I'm not very keen on this idea. You could make a fork, add the functionality and then if this gets enough requests I'll pull it in.

jacobtoye avatar Dec 18 '13 20:12 jacobtoye