[gnome-maps/wip/routing2: 2/3] fixup routeServiec



commit c2ac350812fa160aad1496a267bcd6365121f64f
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Sat May 3 21:16:19 2014 +0200

    fixup routeServiec

 src/routeService.js |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/routeService.js b/src/routeService.js
index c41d17b..aa77525 100644
--- a/src/routeService.js
+++ b/src/routeService.js
@@ -53,10 +53,10 @@ const GraphHopper = new Lang.Class({
         this._query   = new RouteQuery.RouteQuery();
 
         this._query.connect('change', (function() {
-            if(this._query.from && this._query.to)
+            if(this._query.from && this._query.to) {
                 this.fetchRoute([this._query.from, this._query.to],
                                 this._query.transportation);
-            else
+            } else
                 this._route.reset();
         }).bind(this));
 
@@ -64,8 +64,8 @@ const GraphHopper = new Lang.Class({
     },
 
     fetchRoute: function(viaPoints, transportationType) {
-        let url = this._buildURL(viaPoints, transportationType),
-            msg = Soup.Message.new('GET', url);
+        let url = this._buildURL(viaPoints, transportationType);
+        let msg = Soup.Message.new('GET', url);
         this._session.queue_message(msg, (function(session, message) {
             if (message.status_code === 200) {
                 let result = message.response_body.data;
@@ -104,11 +104,11 @@ const GraphHopper = new Lang.Class({
         bbox.extend(route.bbox[1], route.bbox[0]);
         bbox.extend(route.bbox[3], route.bbox[2]);
 
-        return { path:        path,
-                 turnPoints:  turnPoints,
-                 distance:    route.distance,
-                 time:        route.time,
-                 bbox:        bbox };
+        return { path:       path,
+                 turnPoints: turnPoints,
+                 distance:   route.distance,
+                 time:       route.time,
+                 bbox:       bbox };
     },
 
     _createTurnPoints: function(path, instructions) {


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