Matrix times are on seconds now. Removing POST matrix tests
This commit is contained in:
committed by
Patrick Niklaus
parent
2f793473cc
commit
eba5f7d275
@@ -21,16 +21,9 @@ module.exports = function () {
|
||||
|
||||
var runRequest = (cb) => {
|
||||
var params = this.paramsToString(parameters);
|
||||
|
||||
this.query = baseUri + (params.length ? '/' + params : '');
|
||||
|
||||
var options = this.httpMethod === 'POST' ? {
|
||||
method: 'POST',
|
||||
body: params,
|
||||
url: baseUri
|
||||
} : this.query;
|
||||
|
||||
request(options, (err, res, body) => {
|
||||
request(this.query, (err, res, body) => {
|
||||
if (err && err.code === 'ECONNREFUSED') {
|
||||
throw new Error('*** osrm-routed is not running.');
|
||||
} else if (err && err.statusCode === 408) {
|
||||
|
||||
@@ -36,6 +36,7 @@ module.exports = function () {
|
||||
var json = JSON.parse(body);
|
||||
|
||||
var hasRoute = json.code === 'ok';
|
||||
//console.log(json.routes[0].legs[0].steps);
|
||||
|
||||
if (hasRoute) {
|
||||
instructions = this.wayList(json.routes[0]);
|
||||
|
||||
Reference in New Issue
Block a user