J'utilise 2 marqueurs: icône et Tooltip.
Le problème est que, étant donné les mêmes Lon & Lat, ils ne sont pas à la même position.
La position de l'icône est correcte, la position de l'info-bulle non.
Ceci est mon code js pour les 2 marqueurs
Code : Tout sélectionner
//Tooltip
var marker = new L.marker([Lat, Lon], { opacity: 0,});
marker.bindTooltip("50km", { permanent: true, offset: [0, 0],});
marker.addTo(map);
// Icon
var Marker = L.icon({
iconUrl: "Point.png",
iconSize: [27, 32], // size of the icon
iconAnchor: [13, 32], // point of the icon which will correspond to marker's location
popupAnchor: [0, -30], // point from which the popup should open relative to the iconAnchor
});
var starts = new L.LayerGroup();
L.marker([Lat, Lon], { icon: Marker })
.bindPopup(Lat + "<br>" + Lon)
.addTo(starts);

Comment faire pour que le petit < du Tooltip soit exactement au même endroit que la pointe du marqueur ?
Merci d'avance