OSRM: расстояние между пунктами назначения

Добрый день! Подскажите пожалуйста, как через API - http://project-osrm.org/docs/v5.5.2/api/?language=cURL#general-options получить расстояние между двумя точками?

freeExec, исправлен заголовок

Внимательно смотреть ответ сервера и читать мануалы . И че за сабж???

У маршрута есть атрибут расстояние

http://project-osrm.org/docs/v5.5.2/api/?language=cURL#route-service
http://project-osrm.org/docs/v5.5.2/api/?language=cURL#route-object

Ахтунг, кулхацкеры.
simwin, SQL injection так не делается.

Благодарю!

Теперь вопрос с координатами. В какой системе координат рабоет API? Где, что почитать?

В WGS 84 (EPSG:4326).

Не совсем по теме, но не мог бы кто-нибудь помочь с запуском локального osrm-frontend на чистой Ubuntu Desktop 16.04? osrm-backend локально запустился и работает, а это не хочет:


yuryleb@ubuntu:~/Code/osrm-frontend-gh-pages$ npm install
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17
yuryleb@ubuntu:~/Code/osrm-frontend-gh-pages$ npm start

> osrm-frontend@0.4.0 start /home/yuryleb/Code/osrm-frontend-gh-pages
> npm run build && npm run start-index


> osrm-frontend@0.4.0 build /home/yuryleb/Code/osrm-frontend-gh-pages
> browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map=bundle.js.map -o bundle.js && cp node_modules/leaflet/dist/leaflet.css css/leaflet.css

/usr/bin/env: ‘node’: No such file or directory

npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! osrm-frontend@0.4.0 build: `browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map=bundle.js.map -o bundle.js && cp node_modules/leaflet/dist/leaflet.css css/leaflet.css`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the osrm-frontend@0.4.0 build script 'browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map=bundle.js.map -o bundle.js && cp node_modules/leaflet/dist/leaflet.css css/leaflet.css'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the osrm-frontend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map=bundle.js.map -o bundle.js && cp node_modules/leaflet/dist/leaflet.css css/leaflet.css
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs osrm-frontend
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls osrm-frontend
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/yuryleb/Code/osrm-frontend-gh-pages/npm-debug.log

npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! osrm-frontend@0.4.0 start: `npm run build && npm run start-index`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the osrm-frontend@0.4.0 start script 'npm run build && npm run start-index'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the osrm-frontend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build && npm run start-index
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs osrm-frontend
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls osrm-frontend
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/yuryleb/Code/osrm-frontend-gh-pages/npm-debug.log
yuryleb@ubuntu:~/Code/osrm-frontend-gh-pages$ 

Ему вообще нужен внешний веб-сервер, как старому osrm-frontend (ныне legacy), не написано же ничего на этот счет?

А смотрели что же написано в /home/yuryleb/Code/osrm-frontend-gh-pages/npm-debug.log и запускается ли у вас browserify?

Тоже самое npm-debug.log и содержит.
И browserify не запускается:

yuryleb@ubuntu:~/Code/osrm-frontend-gh-pages$ browserify
/usr/bin/env: ‘node’: No such file or directory
yuryleb@ubuntu:~/Code/osrm-frontend-gh-pages$ 

Ёшкин кот, надо было еще сделать самому линк /usr/bin/node на /usr/bin/nodejs :rage:

Даешь issue с описанием проблемы тут https://github.com/Project-OSRM/osrm-backend/issues

Это скорее на browserify надо жаловаться.

Хотя osrm-backend тоже хорош - libbindlua-dev (или libluabind-dev, забыл уже ;)) в зависимостях не указан. Но пусть лучше таки доделают запрет сквозной маршрутизации по vehicle=destination и займутся запретом вольной езды по мостам.