[gnome-maps/wip/routing2] FIXUP: Squash route and GH patch with this



commit 7814a7e9d31f448114aa6edd1af733ff2c45709d
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Thu May 1 22:45:11 2014 +0200

    FIXUP: Squash route and GH patch with this

 src/routeService.js |   31 ++++++++-----------------------
 1 files changed, 8 insertions(+), 23 deletions(-)
---
diff --git a/src/routeService.js b/src/routeService.js
index b4512d1..ecb96e6 100644
--- a/src/routeService.js
+++ b/src/routeService.js
@@ -31,20 +31,17 @@ const Route = imports.route;
 const EPAF = imports.epaf;
 const HTTP = imports.http;
 
-const RouteService = new Lang.Class({
-    Name: 'RouteService',
-    Abstract: true,
+const GraphHopper = new Lang.Class({
+    Name: 'GraphHopper',
 
-    _init: function() {
-        this._session = new Soup.SessionAsync({ user_agent : "gnome-maps" });
+    _init: function(url) {
+        this._session = new Soup.Session({ user_agent : "gnome-maps" });
+        this._key = "VCIHrHj0pDKb8INLpT4s5hVadNmJ1Q3vi0J4nJYP";
+        this._baseURL = url || "http://graphhopper.com/api/1/route?";;
+        this._locale = 'en_US'; // TODO: get this from env
+        this.parent();
     },
 
-    _buildURL: function(viaPoints, transportation) {},
-
-    _parseResult: function(result) {},
-
-    _transportationToString: function() {},
-
     getRoute: function(viaPoints, transportationType, callback) {
         let url = this._buildURL(viaPoints, transportationType),
             msg = Soup.Message.new('GET', url);
@@ -56,18 +53,6 @@ const RouteService = new Lang.Class({
                 callback("Error: " + message.status_code);
             }
         }).bind(this));
-    }
-});
-
-const GraphHopper = new Lang.Class({
-    Name: 'GraphHopper',
-    Extends: RouteService,
-
-    _init: function(url) {
-        this._key = "VCIHrHj0pDKb8INLpT4s5hVadNmJ1Q3vi0J4nJYP";
-        this._baseURL = url || "http://graphhopper.com/api/1/route?";;
-        this._locale = 'en_US'; // TODO: get this from env
-        this.parent();
     },
 
     _vehicle: function(transportationType) {


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