react-leaflet-draw icon indicating copy to clipboard operation
react-leaflet-draw copied to clipboard

how do i manage to get the measure distance from _oncreate polyline even?

Open rodri595 opened this issue 5 years ago • 0 comments

_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

rodri595 avatar Sep 13 '20 00:09 rodri595