map.php generating maps
Well
Over the last week I have been hacking away at our map.php page. My initial plan was to use a combination of straight php odbc call to our DB and then display this information using Google Maps API (javaScript). Now, this works fine until you need to loop through the database to get live updates of the current position of a iTrac Device...since php is server side, that is, it all gets processed on the server before reaching the client, my design fell over. Instead of getting then next point in the DB, I was getting the same point over and over again. This was even worst when trying to plot a history of points.....BIG PROBLEM
Solution, ajax xml parsing and php output to xml. So, I now call a php script I have written, then read in the output using ajax GXmlHttp. This way, I can query the DB, using php and then read in the results.
So, Over the last couple of night I can now do:
Thats it for now
Shawn
Over the last week I have been hacking away at our map.php page. My initial plan was to use a combination of straight php odbc call to our DB and then display this information using Google Maps API (javaScript). Now, this works fine until you need to loop through the database to get live updates of the current position of a iTrac Device...since php is server side, that is, it all gets processed on the server before reaching the client, my design fell over. Instead of getting then next point in the DB, I was getting the same point over and over again. This was even worst when trying to plot a history of points.....BIG PROBLEM
Solution, ajax xml parsing and php output to xml. So, I now call a php script I have written, then read in the output using ajax GXmlHttp. This way, I can query the DB, using php and then read in the results.
So, Over the last couple of night I can now do:
- A live display of a iTrac unit and see were it goes,
- A history display of a Unit to see where it has been.
Thats it for now
Shawn
0 Comments:
Post a Comment
<< Home