[gnome-maps/wip/mlundblad/transit-routing: 5/33] routeQuery: Add	ability to set options for transit routing
- From: Marcus Lundblad <mlundblad src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-maps/wip/mlundblad/transit-routing: 5/33] routeQuery: Add	ability to set options for transit routing
 
- Date: Fri,  9 Dec 2016 21:41:59 +0000 (UTC)
 
commit 195ac8c123297ea7e67adc1668ee7ddcc3808978
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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755808
 src/routeQuery.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/routeQuery.js b/src/routeQuery.js
index 99ecfaa..1be3994 100644
--- a/src/routeQuery.js
+++ b/src/routeQuery.js
@@ -25,6 +25,7 @@ const Lang = imports.lang;
 
 const Application = imports.application;
 const PlaceStore = imports.placeStore;
+const TransitOptions = imports.transitOptions;
 
 const Transportation = {
     CAR:        0,
@@ -148,11 +149,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 = new TransitOptions.TransitOptions();
         this.reset();
     },
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]