Implements Alternatives for MLD
This commit is contained in:
committed by
Patrick Niklaus
parent
fef0344be0
commit
54ceb05420
@@ -55,7 +55,7 @@ test('route: throws with too few or invalid args', function(assert) {
|
||||
});
|
||||
|
||||
test('route: provides no alternatives by default, but when requested it may (not guaranteed)', function(assert) {
|
||||
assert.plan(6);
|
||||
assert.plan(9);
|
||||
var osrm = new OSRM(monaco_path);
|
||||
var options = {coordinates: two_test_coordinates};
|
||||
|
||||
@@ -70,6 +70,12 @@ test('route: provides no alternatives by default, but when requested it may (not
|
||||
assert.ok(route.routes);
|
||||
assert.ok(route.routes.length >= 1);
|
||||
});
|
||||
options.alternatives = 3;
|
||||
osrm.route(options, function(err, route) {
|
||||
assert.ifError(err);
|
||||
assert.ok(route.routes);
|
||||
assert.ok(route.routes.length >= 1);
|
||||
});
|
||||
});
|
||||
|
||||
test('route: throws with bad params', function(assert) {
|
||||
@@ -542,4 +548,4 @@ test('route: throws on bad approaches', function(assert) {
|
||||
approaches: [10, 15]
|
||||
}, function(err, route) {}) },
|
||||
/Approach must be a string: \[curb, unrestricted\] or null/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user