Topo2: Refactored Maps and Sprites to be managed by a BackgroundService

Change-Id: I75965fc76734436ce0c68e06dd75663baa924287
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js b/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js
index ad8dfa9..6c19fe9 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js
@@ -39,6 +39,13 @@
                 visible: this.name + '_visible'
             }
         },
+        appendElement: function (parent, node) {
+            var el = d3.select('#' + this.id);
+            if (el.empty()) {
+                 return d3.select(parent).append(node).attr('id', this.id);
+            }
+            return el;
+        },
         node: function() {
             return d3.select('#' + this.id);
         },