[gnome-maps/wip/osrm-routing] OSRM: fill sidebar with directions



commit 3cbb68feb2af196d31fc3ec278f7d04960a83af2
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Mon Jun 17 18:32:11 2013 +0200

    OSRM: fill sidebar with directions
    
    WIP! WIP! Start filling the Sidebar with route directions as fetched from
    OSRM.

 data/gnome-maps.css |    4 ++++
 src/mapView.js      |    2 +-
 src/sidebar.js      |    9 +++++++++
 3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/data/gnome-maps.css b/data/gnome-maps.css
index 961e54b..bc43998 100644
--- a/data/gnome-maps.css
+++ b/data/gnome-maps.css
@@ -5,3 +5,7 @@
 .maps-sidebar:dir(rtl) {
     border-width: 0 1px 0 0;
 }
+
+.maps-zoom-control {
+    
+}
\ No newline at end of file
diff --git a/src/mapView.js b/src/mapView.js
index f78545e..0eff54c 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -138,7 +138,7 @@ const MapView = new Lang.Class({
                     longitude: instruction.point.lon,
                     size: 8.0
                 }));
-                log(" * " + instruction.toString());
+                this._sidebar.addInstruction(instruction);
             }, this);
 
             this._routeLayer.visible = true;
diff --git a/src/sidebar.js b/src/sidebar.js
index bb7b142..c2ed5aa 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -68,6 +68,15 @@ const Sidebar = new Lang.Class({
         this.conceal();
     },
 
+    addInstruction: function(instruction) {
+        this._ui.instructions.add(new Gtk.ListBoxRow({
+            child: new Gtk.Label({
+                label: instruction.toString()
+            })
+        }));
+        log(" * " + instruction.toString());
+    },
+
     reveal: function() {
         this._ui.revealer.reveal_child = true;
         this._ui.revealButton.symbolic_icon_name = 'go-next-symbolic';


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