perliedman / leaflet-routing-machine

Control for routing in Leaflet
https://www.liedman.net/leaflet-routing-machine/
Other
1.08k stars 350 forks source link

new feature: want to show weight field value along with distance and duration #526

Closed rachha closed 5 years ago

rachha commented 5 years ago

I made some changes in osrm-backend, so weight and duration fields are not going to be the same. Therefore I want to show weight(with units) along with duration and distance. I went through some part of the leaflet-routing-machine code. and also went through formatTime and formatDistance. I understood that we must add formatWeight and weightTemplate. Can someone guides me, I like to contribute this feature. Thanks

rachha commented 5 years ago

I almost made changes at required places. Especially in src/itinerary.js, Now it supposes to print time two times, but it isn't. Any Idea?