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

watch _source changes

Open mepdr opened this issue 9 years ago • 0 comments

It would be very useful to let the tooltip behaving as the referenced source (as it happens for popus). For example, given the following example:

var m = L.marker([46, 11.2]).addTo(map);
var t = L.tooltip({position: 'right', noWrap: true }, m)
            .setContent('Test')
            .addTo(map)
            .setLatLng(new L.LatLng(46, 11.2));
setTimeout(function(){
    map.removeLayer(m);
}, 5000);

When the marker is added/removed to/from the map, the tooltip is added/removed as well.

mepdr avatar Oct 17 '16 09:10 mepdr