lrm-graphhopper
lrm-graphhopper copied to clipboard
Property road not populated in IInstruction object
Hi,
Thanks for making all these plugins to make it easy to try out different routing services.
Noticed that the "road" attribute is not poplated on the instruction object.
IInstruction defined here: https://www.liedman.net/leaflet-routing-machine/api/#iinstruction
Relevant code here
https://github.com/perliedman/lrm-graphhopper/blob/master/src/L.Routing.GraphHopper.js#L221
Adding road: instr.street_name seems to do the trick.
PS: I know this is looking for a maintainer but thought I'd document it anyway.
I think it might be that street_name was not available from GraphHopper's API when I originally wrote this code, but not sure actually.
Consider creating a PR with this change to get it included in the code.