Project-OSRM / osrm-frontend

Modular rewrite of the OSRM frontend using LRM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong coordinates sent to backend

ceteras opened this issue · comments

Both my frontend and backend are installed via docker.

No route is displayed, and I see a 400 Bad request in the firefox browser console (for a route near London, UK):

Request URL:http://localhost:5000/route/v1/driving/-362.8056335449219,53.26521293124656;-360.2032470703125,51.43003944716933?overview=false&alternatives=true&steps=true&hints=;
Request method:GET
Remote address:127.0.0.1:5000
Status code: 400

The longitude is wrong in this url, its value is (lon-360) where lon would be the actual value.
I mean the correct link would be:

http://localhost:5000/route/v1/driving/-2.8056335449219,53.26521293124656;-0.2032470703125,51.43003944716933?overview=false&alternatives=true&steps=true&hints=;

The same wrong coordinates are updated in the browser's url bar:

http://localhost:9966/?z=9&center=51.704906%2C-360.924225&loc=53.265213%2C-362.805634&loc=51.430039%2C-360.203247&hl=en&alt=0

My frontend version is 0.4.0 .

...
> osrm-frontend@0.4.0 start-index /src
> budo src/index.js --serve=bundle.js --live -d | bistre

[0000] info  Server running at http://172.17.0.4:9966/ (connect)
[0000] info  LiveReload running on 35729
...

Update:
This happens only when I scroll the map towards west, starting from its default position.
If I want to pan towards UK, so I change the map to a lower zoom level, then pan to UK and zoom back to a high level, the longitude gets a lower than -180 value.
If I pan towards east, it gets the correct values, as expected.

yeah we're getting this as well - very weird