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


Ignore:
Timestamp:
03/23/2019 09:19:23 AM (7 years ago)
Author:
jdalbey
Message:

Add a demo video to highway 241 in cctvLayer.js

File:
1 edited

Legend:

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

    r339 r341  
    6868            imgDir = "CCTVSlow/" 
    6969        } 
    70  
    71         cctv_infowindow.setContent('<div style="font-weight:bold;font-family: monospace">' +  cctvIndex + "&nbsp;" + cctvLocation + "&nbsp;" +currentColor + "<BR>" + imgTag + imgDir + cctvIndex + '.jpg">' + "</div>"); 
     70        // Demo of video embed - only on highway 241 locations 
     71        if (cctvIndex.startsWith("12-241")) 
     72        { 
     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>'); 
     74        } 
     75        else  
     76        // image from fast or slow directories 
     77        { 
     78            cctv_infowindow.setContent('<div style="font-weight:bold;font-family: monospace">' +  cctvIndex + "&nbsp;" + cctvLocation + "&nbsp;" +currentColor + "<BR>" + imgTag + imgDir + cctvIndex + '.jpg">' + "</div>"); 
     79        } 
    7280        cctv_infowindow.setPosition(event.feature.getGeometry().get()); 
    7381        cctv_infowindow.open(map); 
Note: See TracChangeset for help on using the changeset viewer.