Read time/energy calc variables from profile
and ensure profile text is loaded before updating route and straight line stats
This commit is contained in:
parent
9abf4b94c4
commit
4d44153316
5 changed files with 57 additions and 20 deletions
|
|
@ -7,7 +7,13 @@ const geoJson = require('../format/data/track.json');
|
|||
test('simple track', () => {
|
||||
const coordinates = geoJson.features[0].geometry.coordinates;
|
||||
const properties = geoJson.features[0].properties;
|
||||
const rc = new BR.RoutingContext();
|
||||
const dummyProfileVars = {
|
||||
getProfileVar(name) {
|
||||
const vars = { validForBikes: 1 };
|
||||
return vars[name];
|
||||
},
|
||||
};
|
||||
const rc = new BR.RoutingContext(dummyProfileVars);
|
||||
const stdPath = new BR.StdPath();
|
||||
|
||||
for (let i = 0; i < coordinates.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue