Leaflet - How to match marker and polyline on drag and drop
I have a project with leafletJS. For example, I have 2 points (A, B) in map. I display it as 2 Markers I must draw a polyline from A to B. I moved marker A and I want to the head of polyline of marker A match to marker A (moved follow marker A). How can I do this? Sorry for my bad English. Thanks all very much. Truong M. Given the following L.Latlng 's, L.Marker 's and L.Polyline : var a = new L.LatLng(-45, -90), b = new L.LatLng(45, 0), c = new L.LatLng(-45, 90); var marker_a = new L.Marker(a, {draggable: true}).addTo(map), marker_b = new L.Marker(b, {draggable: true}).addTo(map), marker_c =