I want to have a tooltip on clicking my marker, but I don't find a way to make this. Leaflet seems to open tooltips only with mouseover.
This is my code:
var marker = L.marker([x1, y1], {icon: myIcon})
.addTo(map)
.bindTooltip('<?=$desc[$i]?>', {direction:'top', sticky: false, opacity:0.8, offset:[0, -22] });
Thank you for having a look at this code.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…