[gnome-maps/wip/mlundblad/transit-service-discovery: 5/13] openTripPlanner: Don't take GraphHopper instance as a parameter
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/transit-service-discovery: 5/13] openTripPlanner: Don't take GraphHopper instance as a parameter
- Date: Sat, 31 Aug 2019 10:55:31 +0000 (UTC)
commit 3117edefa6aae8c2f053cdec4852a5024b65df85
Author: Marcus Lundblad <ml update uu se>
Date: Sun Aug 18 11:32:23 2019 +0200
openTripPlanner: Don't take GraphHopper instance as a parameter
Instead access it through the Application global instance.
This way, the coming transit pluging handler will not have
to handle passing the GraphHopper instance directly to plugins
needing it.
src/transitplugins/openTripPlanner.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/transitplugins/openTripPlanner.js b/src/transitplugins/openTripPlanner.js
index b909df7..7303eb3 100644
--- a/src/transitplugins/openTripPlanner.js
+++ b/src/transitplugins/openTripPlanner.js
@@ -23,6 +23,7 @@ const Champlain = imports.gi.Champlain;
const GLib = imports.gi.GLib;
const Soup = imports.gi.Soup;
+const Application = imports.application;
const EPAF = imports.epaf;
const HTTP = imports.http;
const Location = imports.location;
@@ -128,7 +129,6 @@ var OpenTripPlanner = class OpenTripPlanner {
*/
this._routersUpdatedTimestamp = 0;
this._query = params.query;
- this._graphHopper = params.graphHopper;
this._plan = new TransitPlan.Plan();
this._baseUrl = this._getBaseUrl();
this._walkingRoutes = [];
@@ -797,7 +797,7 @@ var OpenTripPlanner = class OpenTripPlanner {
let route = this._walkingRoutes[index];
if (!route) {
- this._graphHopper.fetchRouteAsync(points,
+ Application.routingDelegator.graphHopper.fetchRouteAsync(points,
RouteQuery.Transportation.PEDESTRIAN,
(newRoute) => {
this._walkingRoutes[index] = newRoute;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]