Topo2 Fixed device positions

Change-Id: I10e61981000b427ff1ebf6ae0c35bfb2cdbb9c4b
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2.js b/web/gui/src/main/webapp/app/view/topo2/topo2.js
index 839a736..ef76ac1 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2.js
@@ -25,7 +25,7 @@
 
     // references to injected services
     var $scope, $log, fs, mast, ks, zs,
-        gs, sus, ps, t2es, t2fs, t2is, t2bcs, t2kcs, t2ms;
+        gs, sus, ps, t2es, t2fs, t2is, t2bcs, t2kcs, t2ms, t2mcs;
 
     // DOM elements
     var ovtopo2, svg, defs, zoomLayer, forceG;
@@ -88,12 +88,13 @@
         'WebSocketService', 'PrefsService', 'ThemeService',
         'Topo2EventService', 'Topo2ForceService', 'Topo2InstanceService',
         'Topo2BreadcrumbService', 'Topo2KeyCommandService', 'Topo2MapService',
+        'Topo2MapConfigService',
 
         function (_$scope_, _$log_, _$loc_,
             _fs_, _mast_, _ks_, _zs_,
             _gs_, _ms_, _sus_, _flash_,
             _wss_, _ps_, _th_,
-            _t2es_, _t2fs_, _t2is_, _t2bcs_, _t2kcs_, _t2ms_) {
+            _t2es_, _t2fs_, _t2is_, _t2bcs_, _t2kcs_, _t2ms_, _t2mcs_) {
 
             var params = _$loc_.search(),
                 dim,
@@ -127,6 +128,7 @@
             t2bcs = _t2bcs_;
             t2kcs = _t2kcs_;
             t2ms = _t2ms_;
+            t2mcs = _t2mcs_;
 
             // capture selected intent parameters (if they are set in the
             //  query string) so that the traffic overlay can highlight
@@ -177,25 +179,25 @@
                 function (proj) {
                     var z = ps.getPrefs('topo_zoom', { tx: 0, ty: 0, sc: 1 });
                     zoomer.panZoom([z.tx, z.ty], z.sc);
+
+                    t2mcs.projection(proj);
                     $log.debug('** Zoom restored:', z);
                     $log.debug('** We installed the projection:', proj);
+
+                    // Now the map has load and we have a projection we can
+                    // get the info from the server
+                    t2es.start();
+
                 }
             );
 
             // initialize the force layout, ready to render the topology
             forceG = zoomLayer.append('g').attr('id', 'topo-force');
+
             t2fs.init(svg, forceG, uplink, dim);
             t2bcs.init();
             t2kcs.init(t2fs);
 
-
-            // =-=-=-=-=-=-=-=-
-            // TODO: in future, we will load background map data
-            //  asynchronously (hence the promise) and then chain off
-            //  there to send the topo2start event to the server.
-            // For now, we'll send the event inline...
-            t2es.start();
-
             t2is.initInst({ showMastership: t2fs.showMastership });
 
             // === ORIGINAL CODE ===