This open-source demo adds linear, segment-by-segment measurements to an interactive map. It estimates per-segment and total polyline costs for scenarios like fiber network cable installation.
Made by NewLightTechnologies.com on https://github.com/NLTGit/Leaflet.LinearMeasurement