diff --git a/web/gui/src/main/webapp/app/fw/nav/nav.js b/web/gui/src/main/webapp/app/fw/nav/nav.js
index 671fa91..d962b8e 100644
--- a/web/gui/src/main/webapp/app/fw/nav/nav.js
+++ b/web/gui/src/main/webapp/app/fw/nav/nav.js
@@ -25,6 +25,7 @@
 
     // internal state
     var navShown = false;
+    var ovParamsDataNs = {};
 
     function updatePane() {
         var vis = navShown ? 'visible' : 'hidden';
@@ -51,8 +52,19 @@
         return false;
     }
 
+    function isEmpty(obj) {
+        for (var x in obj) { return false; }
+        return true;
+    }
+
     function navTo(path, params) {
+
         var url;
+        if (params.hasOwnProperty('ovParams') && !isEmpty(params.ovParams) ) {
+            ovParamsDataNs = params.ovParams;
+            delete params.ovParams;
+        }
+
         if (!path) {
             $log.warn('Not a valid navigation path');
             return null;
@@ -68,6 +80,11 @@
         url = $location.absUrl();
         $log.log('Navigating to ', url);
         $window.location.href = url;
+
+    }
+
+    function getOvParamsData() {
+        return ovParamsDataNs;
     }
 
     angular.module('onosNav', [])
@@ -84,18 +101,20 @@
         .factory('NavService',
             ['$log', '$location', '$window', 'FnService',
 
-            function (_$log_, _$location_, _$window_, _fs_) {
+            function (_$log_, _$location_, _$window_, _fs_ ) {
                 $log = _$log_;
                 $location = _$location_;
                 $window = _$window_;
                 fs = _fs_;
 
+
                 return {
                     showNav: showNav,
                     hideNav: hideNav,
                     toggleNav: toggleNav,
                     hideIfShown: hideIfShown,
                     navTo: navTo,
+                    navPassedData: getOvParamsData,
                 };
         }]);
 
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index 04b552c..fef2da5 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -31,7 +31,7 @@
     // references to injected services
     var $scope, $log, $loc, $timeout,
         fs, ks, zs, gs, ms, sus, flash, wss, ps, th, tds, t3s, tes, tfs, tps,
-        tis, tms, tss, tls, tos, fltr, ttbs, tspr, tov;
+        tis, tms, tss, tls, tos, fltr, ttbs, tspr, tov, ns;
 
     // DOM elements
     var ovtopo, svg, defs, zoomLayer, mapG, spriteG, forceG, noDevsLayer;
@@ -596,7 +596,7 @@
             'TopoSelectService', 'TopoLinkService', 'TopoTrafficService',
             'TopoObliqueService', 'TopoFilterService', 'TopoToolbarService',
             'TopoMapService', 'TopoSpriteService', 'TooltipService',
-            'TopoOverlayService', 'LionService',
+            'TopoOverlayService', 'LionService','NavService',
 
                 function (_$scope_, _$log_, _$loc_, _$timeout_, _$cookies_,
                   _fs_, mast, _ks_, _zs_,
@@ -607,7 +607,7 @@
                   _tss_, _tls_, _tts_,
                   _tos_, _fltr_, _ttbs_,
                   _tms_, _tspr_, _ttip_,
-                  _tov_, lion) {
+                  _tov_, lion, _ns_) {
 
             var params = _$loc_.search(),
                 selOverlay = params.overlayId,
@@ -654,6 +654,7 @@
             tspr = _tspr_;
             tov = _tov_;
             tss = _tss_;
+            ns = _ns_;
 
             tms.start({
                 toggleMap: toggleMap,
@@ -661,7 +662,9 @@
                 setMap: setMap,
             });
 
-            // pull intent data from the query string...
+            $scope.ovParamsData = ns.navPassedData();
+
+                    // pull intent data from the query string...
             if (params.key && params.appId && params.appName) {
                 $scope.intentData = {
                     key: params.key,
@@ -671,6 +674,7 @@
                 };
             }
 
+
             $scope.notifyResize = function () {
                 svgResized(fs.windowSize(mast.mastHeight()));
             };
@@ -749,7 +753,7 @@
 
             restoreConfigFromPrefs();
 
-            ttbs.selectOverlay(selOverlay || prefsState.ovid);
+            ttbs.selectOverlay(selOverlay || prefsState.ovid, $scope.ovParamsData);
 
             $log.debug('registered overlays...', tov.list());
             $log.log('OvTopoCtrl has been created');
diff --git a/web/gui/src/main/webapp/app/view/topo/topoToolbar.js b/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
index 8b37002..18559d3 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
@@ -98,6 +98,8 @@
             spr: 'S',
             // NOTE: toolbar state is handled separately
         };
+    // Params passed to overlay.
+    var ovParams = {};
 
     function init(_api_) {
         api = _api_;
@@ -304,12 +306,17 @@
         persistTopoPrefs('toolbar');
     }
 
-    function selectOverlay(ovid) {
+    function getOverlayParams(typeOfOverlay) {
+        return ovParams;
+    }
+
+    function selectOverlay(ovid, params) {
         var idx = ovIndex[defaultOverlay] || 0,
             pidx = (ovid === null) ? 0 : ovIndex[ovid] || -1;
         if (pidx >= 0 && pidx < ovRset.size()) {
             idx = pidx;
         }
+        ovParams = params;
         ovRset.selectedIndex(idx);
     }
 
@@ -341,6 +348,7 @@
                 toggleToolbar: toggleToolbar,
                 selectOverlay: selectOverlay,
                 defaultPrefs: defaultPrefsState,
+                paramsOverlay: getOverlayParams,
                 fnkey: fnkey,
                 setLionBundle: function (bundle) { topoLion = bundle; },
             };
