[gnome-maps/wip/routing2: 7/7] TEMP: Test the routing



commit a21e339ac4c266910b526c628b13d605f7e8c6a4
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Tue Apr 22 04:58:18 2014 +0200

    TEMP: Test the routing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728695

 src/mainWindow.js |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 01d37b5..15d9afe 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -79,6 +79,20 @@ const MainWindow = new Lang.Class({
 
         this._overlay.add_overlay(new ZoomControl.ZoomControl(this.mapView));
         this._overlay.show_all();
+
+        const Geocode = imports.gi.GeocodeGlib;
+        let (query   = Application.routeService.query,
+             berlin  = new Geocode.Location({ latitude: 52.536273, longitude: 13.007813 }),
+             kiev    = new Geocode.Location({ latitude:50.289339,  longitude: 30.761719 }),
+             other   = new Geocode.Location({ latitude:51.289339,  longitude: 31.761719 })) {
+            query.setMany({ from: berlin, to: kiev });
+            Mainloop.timeout_add(5000, (function() {
+                query.setMany({ from: kiev, to: other });
+                Mainloop.timeout_add(5000, (function() {
+                    query.reset();
+                }));
+            }));
+        };
     },
 
     _initSearchWidgets: function() {


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