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



commit e45b54dd9e505f4e002861ec305c6120bb1d51e9
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]