Index: trunk/webapps/visualizer/index.html
===================================================================
--- trunk/webapps/visualizer/index.html	(revision 528)
+++ trunk/webapps/visualizer/index.html	(revision 530)
@@ -5,5 +5,5 @@
 <!-- map center button icon from http://icons8.com/.  (Obligatory backlink, don't remove ) -->
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-    <title>Visualizer</title> 
+    <title>Visualizer </title> 
 <link rel="icon" 
       type="image/png" 
@@ -14,28 +14,7 @@
   <body>
     <!-- 
-         Version 6.5 Adjust cms dialog dimensions for Chrome.
-	     Version 6.4 Remove fullscreen control. (Use Browser F11 instead).
-         Version 6.3 decomposed into modules for each layer
-         Version 6.2 puts cctv and cms and vds in separate data layers.   
-         Version 6.1 Puts cms messages in json formatted file.  Polls for updates.
-         Version 6.0 Adds speed-dependent images to infowindow for cctv icons
-         Version 5.8 Adds an infowindow with a static image for all cctv icons
-         Version 5.7 integrates CCTV icons and button (but empty click handler)
-         Version 5.6 integrates CMS features
-         Version 5.5 renames title to CPTMS, loads static data on startup and dynamic data
-         every ten seconds.  
-         Version 5.4 adds Search box and Center button
-         Version 5.3 fixed dot color update defect, increased refresh rate to 10 sec.
-         Version 5.2 places red dots overlapping yellow dots.
-         Version 5.1 removes the map and street view buttons and the H3 tag.
-         Version 5 uses precomputed perpendicular vector in dot adjustment function
-         Version 4 Adjust the spacing between dots when the map is zoomed.
-         Version 3 does loadGeoJson only once, and subsequently does an ajax load
-         of the highways file, and selectively updates only those placePins whose
-         color has changed. 
-         @author jdalbey  2019.2.17
+         Visualizer created from CPTMS
+         @author tkumar and jdalbey 2019.11.23
     -->
-    <!-- The text area input for the Search Box -->
-    <input id="search-input" class="controls" type="text" placeholder="Search Box">
     <!--The div element where the map appears. -->
     <div id="mapdiv"></div>
@@ -44,10 +23,6 @@
    <!--The div elements where the buttons appear-->
     <div id="ctrButton"><img width="30" src="images/btn_mapcenter.png"></div>
-    <!-- <button id="harButton" class="unstyled-button"><img id="harBtnImg" src="images/btnReady_HAR.png"></button>
-    <button id="cctvButton" class="unstyled-button"><img id="cctvBtnImg" src="images/btnReady_CCTV.png"></button>
-    <button id="cmsButton" class="unstyled-button"><img id="cmsBtnImg" src="images/btnReady_CMS.png"></button>-->
-    <button id="vdsButton" class="unstyled-button"><img id="vdsBtnImg" src="images/btnDepressed_VDS.png"></button>
     <p id="time">00:00:00</p>
-    <button id="start" >Beginning</button>
+    <button id="beginning" >Beginning</button>
     <button id="forward" >Next</button>
 	<button id="backward" >Back</button>
@@ -94,9 +69,9 @@
     var iconVDSwhite = "images/circle_white.png"
     var vds_showing = true;
-    var filters = []; //array to hold markers for visualizer
-    var times = []; //array to hold times of each traffic event
-    times[0] = "00:00:00";
-    var diff_arr = []; // array to hold difference in target markers
-    var index = -1; //to index into above array
+    var targetDots = []; // 2d array containing targetDots parsed from each line in traffic events file
+    var eventTimes = []; //array to hold times of each traffic event
+    eventTimes[0] = "00:00:00";
+    var diff_arr = []; // 2d array containing difference in map state between each event
+    var eventIndex = -1; //to index into above array
 
     // Use larger VDS icons if we're being displayed on the video wall
@@ -125,12 +100,4 @@
     }
 
-    // Initialize the view/hide buttons 
-    function initLayerButtons()
-    {
-        initVDSbutton();
-        initForwardbutton();
-        initVDSicons();
-    }
-
     // Initialize the map and load the points
     function initMap()
@@ -148,17 +115,11 @@
 
         // setup the search box and center button
-        initSearch();
+        //initSearch();
         initCenter();
         
-        loadVDSlayer(); // go load the map data
-        processVDS();
+        initializeVDSlayer(); // go load the map data
 
-        initLayerButtons(); // setup the show/hide layer buttons
-
-        updateVDSlayer();
-        setTimeout(function() {
-            buildDiff();
-            updateVDSlayer();
-        }, 3000);
+        initControlButtons();
+        initVDSicons()
 
         // Listen for zoom changes and move the vds dots so as to keep a nice
