[gnome-maps/wip/mlundblad/transit-service-discovery: 4/15] 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: 4/15] openTripPlanner: Don't take GraphHopper instance as a parameter
- Date: Mon, 9 Sep 2019 18:20:44 +0000 (UTC)
commit 90336443a444f93fc791a68f41b152f59392219c
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]