Changeset 351 in tmcsimulator for trunk/webapps/js/cctvLayer.js


Ignore:
Timestamp:
03/31/2019 10:20:47 AM (7 years ago)
Author:
jdalbey
Message:

updated ei notebook proof of concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/webapps/js/cctvLayer.js

    r341 r351  
    6868            imgDir = "CCTVSlow/" 
    6969        } 
     70        var label = "freeflow"; 
     71        if (currentColor == "red") 
     72        { 
     73            label = "stopped"; 
     74        } 
     75        if (currentColor == "yellow") 
     76        { 
     77            label = "slow"; 
     78        } 
     79 
    7080        // Demo of video embed - only on highway 241 locations 
    7181        if (cctvIndex.startsWith("12-241")) 
    7282        { 
    73             cctv_infowindow.setContent('<div style="font-weight:bold;font-family: monospace">' +  cctvIndex + "&nbsp;" + cctvLocation + "&nbsp;" +currentColor + '<BR><video width="320" height="240" autoplay  controls loop><source src="images/TrafficFreeflow.ogv" type="video/ogg"></div>'); 
     83            cctv_infowindow.setContent('<div style="font-weight:bold;font-family: monospace">' +  cctvIndex + "&nbsp;" + cctvLocation + "&nbsp;" + '<BR><video  autoplay loop><source src="images/TrafficFreeflow.ogv" type="video/ogg"></div>'); 
    7484        } 
    7585        else  
    7686        // image from fast or slow directories 
    7787        { 
    78             cctv_infowindow.setContent('<div style="font-weight:bold;font-family: monospace">' +  cctvIndex + "&nbsp;" + cctvLocation + "&nbsp;" +currentColor + "<BR>" + imgTag + imgDir + cctvIndex + '.jpg">' + "</div>"); 
     88            cctv_infowindow.setContent('<div style="font-weight:bold;font-family: monospace">' +  cctvIndex + "&nbsp;" + cctvLocation + "&nbsp;" +label+ "<BR>" + imgTag + imgDir + cctvIndex + '.jpg">' + "</div>"); 
    7989        } 
    8090        cctv_infowindow.setPosition(event.feature.getGeometry().get()); 
Note: See TracChangeset for help on using the changeset viewer.