Project-OSRM / osrm-frontend

Modular rewrite of the OSRM frontend using LRM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No services drop down menu or links to alt routes

bib1963 opened this issue · comments

Not sure how far I will get with this....

I managed to build osrm without docker. It runs just fines except for a couple of issues.

On https://map.project-osrm.org, I can see the services drop list showing car, bike & foot. In src/leaflet_options.js, only car is listed, and I had thought that since there was only a single entry, there would be no drop down.

So, I edited the options files and have:
services: [{
label: 'Car',
path: 'http://www:5000/route/v1'
},{
label: 'Bike',
path: 'http://www:5001/route/v1'
}],

I thought this would work. Alas, I still see no drop down list. It is still contacting http://www:5000/route/v1. There are no errors, on the viewer console, the osrm-backend or on the apache logs.

I tried on Vivaldi & FF.

And I see no way to choose alternate routes...

Hmmm, seems like "services" is only read once:
var controlOptions = {
[...]
serviceUrl: leafletOptions.services[0].path,

Checking git, I see no reference to services. It's as if map.project-osm is running a different version of the software.

Yup, that seems to have done the trick. Thanks.