Open Stalfur opened 9 years ago
I see no evidence that OSRM is doing what you claim. The fact that the ferry crossing and the next segment of road are all being returned as a single entry pretty much rules it out, and the OSRM web site does exactly the same thing and doesn't mention ferries (see http://osrm.at/df1).
If OSRM does support ferries in the way you claim, then the tagging here is obviously not what it is expecting. In any case this is clearly not a problem with the OSM web site.
osrm returns the travel mode for each part of the route, encoded as an integer defined here: https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L147
note that the travel mode codes are different for each profile
I'm not sure how the codes the profile returns to the engine help us? or do they propagate to the API in some way? In any case I'm now sure we would want to rely on some profile specific number that might change at any time.
None of that explains how come the route segment includes both the ferry and a chunk of road - what code exactly does that get?
@tomhughes well in cases like that it helps to have a look at the API documentation:
https://github.com/Project-OSRM/osrm-backend/wiki/Server-api#query-2
Last value of the instructions array mode
. It is save to use the value from the default profile since we operate the demo server and don't intend to change it.
That said there seems to be a bug in the instructions generation that doesn't advertise a new instruction if there is no turn (regardless of whether the mode changes or not). Tracking that in osrm-backend
. Regardless mode support is still missing from osm.org, so you should re-open this.
The problem is I didn't write any of this, and I know next to nothing about it, so I'm basically fumbling in the dark unless people can point me at the right documentation.
Thanks for your help in figuring out the issues. I'll reopen this, and hope somebody feels like fixing it ;-)
I'll take a look when I have a spare moment (not sure I currently have a working openstreetmap-website, but it should be a reasonably easy fix).
Looks fixed but missing a language file entry in default En-US English.
Clicking on link in topic starter gives a screen with a ferry icon for ferry route but an error message for text.
I only get ferry with Valhalla. OSRM still has unnamed road. Its output probably changed since https://github.com/openstreetmap/openstreetmap-website/pull/1068.
The text field should really say it is by ferry, the first 200 meters in step 10 in this route are by ferry but that is not indicated in the text field itself.
Perhaps it should be split up so "10. 200 meters by ferry" would be displayed. According to OSRM the value of "travel by ferry" or similar is returned, but the display side is not using it.