[gnome-maps/wip/mlundblad/transit-routing: 2/15] routeQuery: Add support for transit mode



commit e15a85b76ba110ae08c36a08f4f6c9c13dbc73d0
Author: Marcus Lundblad <ml update uu se>
Date:   Thu Mar 17 21:32:13 2016 +0100

    routeQuery: Add support for transit mode

 src/routeQuery.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/routeQuery.js b/src/routeQuery.js
index 1151fd7..9c311f2 100644
--- a/src/routeQuery.js
+++ b/src/routeQuery.js
@@ -30,12 +30,14 @@ const Transportation = {
     CAR:        0,
     BIKE:       1,
     PEDESTRIAN: 2,
+    TRANSIT:    3,
 
     toString: function (transportation) {
         switch(transportation) {
         case Transportation.CAR:        return 'car';
         case Transportation.BIKE:       return 'bike';
         case Transportation.PEDESTRIAN: return 'foot';
+        case Transportation.TRANSIT:    return 'transit';
         default:                        return null;
         }
     }
@@ -90,7 +92,8 @@ const RouteQuery = new Lang.Class({
                                                 GObject.ParamFlags.WRITABLE,
                                                 Transportation.CAR,
                                                 Transportation.PEDESTRIAN,
-                                                Transportation.CAR)
+                                                Transportation.CAR,
+                                                Transportation.TRANSIT)
     },
 
     get points() {


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