hchapa89

GPS Tracking from Mysql Database

Discussion created by hchapa89 on Jun 6, 2014
Latest reply on Jun 9, 2014 by ldai@bergmannpc.com
I am trying to write a javascript application that puts points based on gps coordinates that are stored in mysql database. The database is been populate by an application on a android device and its getting its coordinates and sending them to mysql database. I want to plot the gps that are stored in that database so I can see in real life time where that person is going. I am trying to use ajax in this approach but the problem I am encountering is that I am trying to write a function that I can set an interval.
For example,

function NameOfFunction()     This function is requesting the last record of that mysql database. stores in div html tag as hidden
value
{
dojo.xhrGet({
  
    url: "get-gps.php",
   
    load: function(result) {
       document.getElementById("lng").innerHTML = result;
    }
});
  
}

window.setInterval("NameOfFunction()", 1000);

The problem is how I write a function inside
dojo that can do interval timer so I can track does gps coordinates.
Does anyone have any suggestions or a better approach to my problem.....


Any Ideas........

Please help!!!!

Outcomes