[gnome-maps/wip/mlundblad/transit-routing: 4/22] routeQuery: Add ability to set options for transit routing



commit 5abd975d39ffdab422ea7ab6522100623326d175
Author: Marcus Lundblad <ml update uu se>
Date:   Sun May 29 22:50:58 2016 +0200

    routeQuery: Add ability to set options for transit routing
    
    Adds the ability to set an options object specifying options when
    performing a public transit route search. Currently contains options
    for setting desired transportation modes.

 src/routeQuery.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/routeQuery.js b/src/routeQuery.js
index 59edb3a..1151fd7 100644
--- a/src/routeQuery.js
+++ b/src/routeQuery.js
@@ -144,11 +144,21 @@ const RouteQuery = new Lang.Class({
             this.notify('points');
     },
 
+    get transitOptions() {
+        return this._transitOptions;
+    },
+
+    set transitOptions(options) {
+        this._transitOptions = options;
+        this.notify('points');
+    },
+
     _init: function(args) {
         this.parent(args);
         this._points = [];
         this._time = null;
         this._date = null;
+        this._transitOptions = null;
         this.reset();
     },
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]