Index: branches/realtime_VDS/cptms/index.html
===================================================================
--- branches/realtime_VDS/cptms/index.html	(revision 584)
+++ branches/realtime_VDS/cptms/index.html	(revision 585)
@@ -149,4 +149,7 @@
     var kCCTVfile = "data_layers/cctv_locations_D12.gjson"; // CCTV locations
     var kHARfile = "data_layers/har_locations_D12.gjson"; // CMS locations 
+    var lastFetchFile = "last_fetch_time.txt";
+    var fetchInterval = 15;
+    var liveImage = "images/live.svg"
     var iconCMSactive = "images/icon_cms_active.png";
     var iconCMSidle = "images/icon_cms_idle.png";
@@ -200,4 +203,5 @@
         initVDSbutton();
         initVDSicons();
+        checkLastFetch();
     }
 
@@ -235,4 +239,6 @@
         var harTimer = setInterval(loadAllharMessages, 10000);
 
+        var fetchTimer = setInterval(checkLastFetch, 10000);
+
         // Listen for zoom changes and move the vds dots so as to keep a nice
         // visual distance between them appropriate to the zoom factor
Index: branches/realtime_VDS/cptms/js/vdsLayer.js
===================================================================
--- branches/realtime_VDS/cptms/js/vdsLayer.js	(revision 584)
+++ branches/realtime_VDS/cptms/js/vdsLayer.js	(revision 585)
@@ -160,2 +160,66 @@
 }
 
+//initialize live indicator icon
+function initLiveIcon(success) {
+    //create new img tags for live and not-live indicators
+    var live = document.createElement('img');
+    var notLive = document.createElement('img');
+    live.src ="images/live.svg";
+    live.width = 50 ;
+    live.height= 40 ;
+    notLive.src ="images/fetchError.jpg";
+    notLive.width = 50 ;
+    notLive.height= 50 ;
+    // if fetch is a success, display live img
+    if (success) {
+        console.log(live);
+        if (map.controls[google.maps.ControlPosition.TOP_RIGHT].getLength() > 0)
+            map.controls[google.maps.ControlPosition.TOP_RIGHT].pop();
+        map.controls[google.maps.ControlPosition.TOP_RIGHT].push(live);
+    }
+    // if error, display sad smiley image
+    else {
+        console.log(notLive);
+        if (map.controls[google.maps.ControlPosition.TOP_RIGHT].getLength() > 0)
+            map.controls[google.maps.ControlPosition.TOP_RIGHT].pop();
+        map.controls[google.maps.ControlPosition.TOP_RIGHT].push(notLive);
+    }
+}
+
+//reads first line on last fetch file and checks if its less than 15 minutes old
+function checkLastFetch()
+{
+    var rawFile = new XMLHttpRequest();
+    rawFile.open("GET", lastFetchFile, false);
+    rawFile.onreadystatechange = function ()
+    {
+        if(rawFile.readyState === 4)
+        {
+            if(rawFile.status === 200 || rawFile.status == 0)
+            {
+                var text = rawFile.responseText;
+                // get last fetch time from file
+                var lastFetch = new Date(text);
+                // get current date time
+                var now = new Date();
+                // calculate time difference
+                var msec = now - lastFetch;
+                var days = Math.floor(msec / 1000 / 60 / (60 * 24));
+                msec -= days * 1000 * 60 * 60 * 24
+                var hh = Math.floor(msec / 1000 / 60 / 60);
+                msec -= hh * 1000 * 60 * 60;
+                var mm = Math.floor(msec / 1000 / 60);
+                msec -= mm * 1000 * 60;
+                var ss = Math.floor(msec / 1000);
+                msec -= ss * 1000;
+                // display icon if less than 15 
+               if (days === 0 && hh === 0 && mm < fetchInterval)
+                    initLiveIcon(1)
+                else 
+                    initLiveIcon(0)
+                //console.log(days + " Days "+ hh + " Hours " + mm + " Minutes " + ss + " Seconds");
+            }
+        }
+    }
+    rawFile.send(null);
+}
Index: branches/realtime_VDS/cptms/images/live.svg
===================================================================
--- branches/realtime_VDS/cptms/images/live.svg	(revision 585)
+++ branches/realtime_VDS/cptms/images/live.svg	(revision 585)
@@ -0,0 +1,1 @@
+<svg height="464pt" viewBox="0 -88 464 464" width="464pt" xmlns="http://www.w3.org/2000/svg"><path d="m.0703125 256.703125c.3828125 17.371094 14.5546875 31.261719 31.9296875 31.296875h400c17.671875 0 32-14.328125 32-32v-220.550781zm0 0" fill="#ff3051"/><path d="m464 32c0-17.671875-14.328125-32-32-32h-400c-17.671875 0-32 14.328125-32 32v224c0 .238281.0625.464844.0703125.703125l463.9296875-221.253906zm0 0" fill="#ff4764"/><g fill="#f1f2f2"><path d="m128 200h-56v-120c0-4.417969-3.582031-8-8-8s-8 3.582031-8 8v128c0 4.417969 3.582031 8 8 8h64c4.417969 0 8-3.582031 8-8s-3.582031-8-8-8zm0 0"/><path d="m400 88c4.417969 0 8-3.582031 8-8s-3.582031-8-8-8h-64c-4.417969 0-8 3.582031-8 8v128c0 4.417969 3.582031 8 8 8h64c4.417969 0 8-3.582031 8-8s-3.582031-8-8-8h-56v-48h40c4.417969 0 8-3.582031 8-8s-3.582031-8-8-8h-40v-48zm0 0"/><path d="m168 72c-4.417969 0-8 3.582031-8 8v128c0 4.417969 3.582031 8 8 8s8-3.582031 8-8v-128c0-4.417969-3.582031-8-8-8zm0 0"/><path d="m298.808594 72.503906c-1.988282-.746094-4.191406-.671875-6.125.207032-1.933594.878906-3.4375 2.492187-4.179688 4.480468l-39.816406 106.191406-33.046875-105.78125c-1.324219-4.222656-5.820313-6.566406-10.039063-5.242187-4.222656 1.324219-6.566406 5.820313-5.242187 10.039063l40 128c1.023437 3.261718 4.003906 5.507812 7.417969 5.601562h.222656c3.335938.003906 6.324219-2.066406 7.496094-5.191406l48-128c.746094-1.988282.671875-4.191406-.207032-6.125-.878906-1.933594-2.492187-3.4375-4.480468-4.179688zm0 0"/></g></svg>
Index: branches/realtime_VDS/cptms/images/sad.svg
===================================================================
--- branches/realtime_VDS/cptms/images/sad.svg	(revision 585)
+++ branches/realtime_VDS/cptms/images/sad.svg	(revision 585)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
+<path d="M256,64c105.875,0,192,86.125,192,192s-86.125,192-192,192S64,361.875,64,256S150.125,64,256,64 M256,32
+	C132.281,32,32,132.281,32,256s100.281,224,224,224s224-100.281,224-224S379.719,32,256,32L256,32z M192,144
+	c-17.688,0-32,21.5-32,48c0,26.531,14.313,48,32,48s32-21.469,32-48C224,165.5,209.688,144,192,144z M320,144
+	c-17.688,0-32,21.5-32,48c0,26.531,14.313,48,32,48s32-21.469,32-48C352,165.5,337.688,144,320,144z M393.594,364.813
+	c7.063-5.313,8.5-15.344,3.219-22.406C363.719,298.313,311.094,272,256,272s-107.734,26.313-140.797,70.406
+	c-5.313,7.063-3.875,17.094,3.188,22.406c7.078,5.281,17.094,3.844,22.406-3.219C167.859,325.531,210.922,304,256,304
+	c45.063,0,88.156,21.531,115.188,57.594C374.344,365.781,379.156,368,384,368C387.344,368,390.719,366.969,393.594,364.813z"/>
+</svg>
Index: branches/realtime_VDS/cptms/last_fetch_time.txt
===================================================================
--- branches/realtime_VDS/cptms/last_fetch_time.txt	(revision 585)
+++ branches/realtime_VDS/cptms/last_fetch_time.txt	(revision 585)
@@ -0,0 +1,1 @@
+03/08/2020 15:48:00
