[gnome-maps/wip/mlundblad/transit-routing] fixup! WIP: Add module to query an OpenTripPlanner instance
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/transit-routing] fixup! WIP: Add module to query an OpenTripPlanner instance
- Date: Tue, 8 Mar 2016 21:41:46 +0000 (UTC)
commit c2cbb8e370ac1f847cb432b5e9a136b9cb52bb6e
Author: Marcus Lundblad <ml update uu se>
Date: Tue Mar 8 22:41:21 2016 +0100
fixup! WIP: Add module to query an OpenTripPlanner instance
src/openTripPlanner.js | 6 ++++++
src/transitPlan.js | 13 +++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/openTripPlanner.js b/src/openTripPlanner.js
index 9b62d03..034ee0c 100644
--- a/src/openTripPlanner.js
+++ b/src/openTripPlanner.js
@@ -193,10 +193,12 @@ const OpenTripPlanner = new Lang.Class({
let routers = this._getRoutersForPoints(points);
if (routers.length > 0) {
+ let itineraries = [];
Utils.debug('about to fetch routes');
this._fetchRoutes(points, routers, (function(routes) {
routes.forEach(function(plan) {
Utils.debug('plan: ' + JSON.stringify(plan));
+
})
}).bind(this));
} else {
@@ -224,5 +226,9 @@ const OpenTripPlanner = new Lang.Class({
Utils.debug('intersecting routers: ' + intersectingRouters);
return intersectingRouters;
+ },
+
+ _createItinerary: function(itinerary) {
+
}
})
diff --git a/src/transitPlan.js b/src/transitPlan.js
index fa055af..7ab0a10 100644
--- a/src/transitPlan.js
+++ b/src/transitPlan.js
@@ -62,7 +62,20 @@ const Itinerary = new Lang.Class({
this._transfers = params.transfers;
delete params.transfers;
+ this._legs = params.legs;
+ delete params.legs;
+ },
+
+ get duration() {
+ return this._duration;
+ },
+
+ get transfers() {
+ return this._transfers;
+ },
+ get legs() {
+ return this._legs;
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]