react-leaflet-draw
react-leaflet-draw copied to clipboard
how do i manage to get the measure distance from _oncreate polyline even?
_onCreated = (e) => {
let type = e.layerType;
let layer = e.layer;
if (type === 'marker') {
layer.bindTooltip("ID Marker :"+layer._leaflet_id+" COORDS START Marker :"+layer._latlng);
}
if (type === 'polyline') {
layer.bindPopup("ID START Polyline :" +layer._leaflet_id+"COORDS START Polyline :"+layer.editing.latlngs[0]);
}
}
this is how i get the coords from the polyline but after that i cant find a way retireve the distance form it