Changeset 581 in tmcsimulator


Ignore:
Timestamp:
02/06/2020 01:41:46 PM (6 years ago)
Author:
jdalbey
Message:

Fix GTEC by removing obsolete updateVDSlayer function and adjusting output format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/webapps/GTEC/js/vdsLayer.js

    r579 r581  
    162162 
    163163                // Assemble the line to be written to the events file 
    164                 var lineOut = "101   " + printableTime + "\t" + first[0] + "\t" +  
    165                 first[1] + "\t" + first[2] + "\t" + range.toFixed(3) + "\t"  
     164                var lineOut = "101\t" + printableTime + "\t" + first[0] + "\t" +  
     165                first[1] + "\t" + Number(first[2]).toFixed(2) + "\t" + range.toFixed(3) + "\t"  
    166166                + getColorAbbr(chosenColor); 
    167167 
     
    242242            postmileList.push(feature.getId()); // save the postmile in a list 
    243243        }); 
    244         // update the dot colors from the dynamic json data  
    245         updateVDSlayer(); 
    246244        // go adjust the marker coordinates so dots don't overlap 
    247245        adjustCoords(calcDistanceFactor()); 
     
    300298            } 
    301299        } 
    302     } 
    303  
    304     // Load the highways dynamic json file and update the map 
    305     function updateVDSlayer() 
    306     { 
    307         eventIndex = -1; 
    308         var parsed_JSON; 
    309         loadJSON(kVDSstatusFile, function(response) 
    310         { 
    311             // Parse JSON string into object 
    312             parsed_JSON = JSON.parse(response); 
    313             // Process each new marker - lookup in current map 
    314             parsed_JSON.features.forEach(updateMarker); 
    315         }); 
    316300    } 
    317301 
Note: See TracChangeset for help on using the changeset viewer.