Merge branch 'master' into sf-osrm-routed
This commit is contained in:
@@ -280,10 +280,11 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
this.reprocessAndLoadData = (callback) => {
|
||||
let p = {loaderArgs: this.loaderArgs, inputFile: this.processedCacheFile};
|
||||
let queue = d3.queue(1);
|
||||
queue.defer(this.writeAndLinkOSM.bind(this));
|
||||
queue.defer(this.extractContractPartitionAndCustomize.bind(this));
|
||||
queue.defer(this.osrmLoader.load.bind(this.osrmLoader), this.processedCacheFile);
|
||||
queue.defer(this.osrmLoader.load.bind(this.osrmLoader), p);
|
||||
queue.awaitAll(callback);
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ module.exports = function () {
|
||||
this.DEFAULT_ENVIRONMENT = process.env;
|
||||
this.DEFAULT_PROFILE = 'bicycle';
|
||||
this.DEFAULT_INPUT_FORMAT = 'osm';
|
||||
this.DEFAULT_LOAD_METHOD = process.argv[process.argv.indexOf('-m') +1].match('mmap') ? 'mmap' : 'datastore';
|
||||
let loadMethod = process.argv[process.argv.indexOf('-m') +1];
|
||||
this.DEFAULT_LOAD_METHOD = loadMethod.match('mmap') ? 'mmap' : loadMethod.match('directly') ? 'directly' : 'datastore';
|
||||
this.DEFAULT_ORIGIN = [1,1];
|
||||
this.OSM_USER = 'osrm';
|
||||
this.OSM_UID = 1;
|
||||
@@ -44,7 +45,7 @@ module.exports = function () {
|
||||
this.OSRM_IP = process.env.OSRM_IP || '127.0.0.1';
|
||||
this.OSRM_CONNECTION_RETRIES = process.env.OSRM_CONNECTION_RETRIES && parseInt(process.env.OSRM_CONNECTION_RETRIES) || 100;
|
||||
this.OSRM_CONNECTION_EXP_BACKOFF_COEF = process.env.OSRM_CONNECTION_EXP_BACKOFF_COEF && parseFloat(process.env.OSRM_CONNECTION_EXP_BACKOFF_COEF) || 1.0;
|
||||
|
||||
|
||||
this.HOST = `http://${this.OSRM_IP}:${this.OSRM_PORT}`;
|
||||
|
||||
this.OSRM_PROFILE = process.env.OSRM_PROFILE;
|
||||
|
||||
@@ -37,6 +37,7 @@ module.exports = function () {
|
||||
this.contractArgs = '';
|
||||
this.partitionArgs = '';
|
||||
this.customizeArgs = '';
|
||||
this.loaderArgs = '';
|
||||
this.environment = Object.assign(this.DEFAULT_ENVIRONMENT);
|
||||
this.resetOSM();
|
||||
|
||||
|
||||
@@ -101,7 +101,8 @@ module.exports = function () {
|
||||
|
||||
this.requestTrip = (waypoints, userParams, callback) => {
|
||||
var defaults = {
|
||||
output: 'json'
|
||||
output: 'json',
|
||||
steps: 'true'
|
||||
},
|
||||
params = this.overwriteParams(defaults, userParams);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user