More plumbing of grid coordinates vs. geo coordinates.
- Added background reference parameter to layout command
- send correct location data to client for devices, hosts

Change-Id: Ic00bda76f4e4bc8d3e23e07a08f3bc5367ec85a9
diff --git a/web/gui/src/main/webapp/app/view/topo/topoModel.js b/web/gui/src/main/webapp/app/view/topo/topoModel.js
index 0b4fd2c..887635d 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoModel.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoModel.js
@@ -115,7 +115,7 @@
         var loc = node.location,
             coord;
 
-        if (loc && loc.type === 'lnglat') {
+        if (loc && loc.type === 'geo') {
             coord = coordFromLngLat(loc);
             node.fixed = true;
             node.px = node.x = coord[0];
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js b/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
index 6dedcd9..694af14 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
@@ -93,7 +93,7 @@
         var loc = el.get('location'),
             coord;
 
-        if (loc && loc.type === 'lnglat') {
+        if (loc && loc.type === 'geo') {
 
             if (loc.lat === 0 && loc.lng === 0) {
                 return false;
@@ -106,6 +106,9 @@
 
             return true;
         }
+
+        // TODO: handle case where loc.type === 'grid'
+        //  implying loc.gridX and loc.gridY hold values
     }
 
     function coordFromLngLat(loc) {