mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 14:22:40 +00:00
rename CarpoolRoute
This commit is contained in:
@@ -39,16 +39,16 @@ export class GraphhopperGeorouter implements GeorouterPort {
|
||||
paths: Path[],
|
||||
settings: GeorouterSettings,
|
||||
): Promise<Route[]> => {
|
||||
this.setDefaultUrlArgs();
|
||||
this.setSettings(settings);
|
||||
return this.getRoutes(paths);
|
||||
this._setDefaultUrlArgs();
|
||||
this._setSettings(settings);
|
||||
return this._getRoutes(paths);
|
||||
};
|
||||
|
||||
private setDefaultUrlArgs = (): void => {
|
||||
private _setDefaultUrlArgs = (): void => {
|
||||
this.urlArgs = ['vehicle=car', 'weighting=fastest', 'points_encoded=false'];
|
||||
};
|
||||
|
||||
private setSettings = (settings: GeorouterSettings): void => {
|
||||
private _setSettings = (settings: GeorouterSettings): void => {
|
||||
if (settings.detailedDuration) {
|
||||
this.urlArgs.push('details=time');
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export class GraphhopperGeorouter implements GeorouterPort {
|
||||
}
|
||||
};
|
||||
|
||||
private getRoutes = async (paths: Path[]): Promise<Route[]> => {
|
||||
private _getRoutes = async (paths: Path[]): Promise<Route[]> => {
|
||||
const routes = Promise.all(
|
||||
paths.map(async (path) => {
|
||||
const url: string = [
|
||||
|
||||
Reference in New Issue
Block a user