lrm-graphhopper icon indicating copy to clipboard operation
lrm-graphhopper copied to clipboard

Property road not populated in IInstruction object

Open mkv123 opened this issue 5 years ago • 1 comments

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.

mkv123 avatar Apr 27 '20 16:04 mkv123

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.

perliedman avatar May 06 '20 14:05 perliedman