Solved

Continuous update/refresh for Google maps - can this be done?

Posted on 2006-10-21
4
359 Views
Last Modified: 2011-10-03
I am trying to build a vehicle tracking system.  It will comprise of:

1) XML file with GPS Coordinates
2) HTML document with Javascipt in order to link in with Google Maps API
3) XSLT document to get xml content into the appropraite format in html document

I have written a separate program in Delphi.  This will automatically update the xml file with the current coordinates of the vehicle.  This will update the XML file every 30 seconds.

It is all working at the moment, but in order for me to see the changing coordinates of the vehicle (remember that the xml file is being updated every 30 seconds) then i have to load the xml file and refresh the cache.  I can't simply just refresh the html page as this just refreshes the html data.

Does anyone know of a way to have the xml data feed into the html document and continuously update the map that is being displayed?  If this can be done without requiring the user to refresh anything (html or xml) then this would be the perfect solution.

Thanks in advance.
0
Comment
Question by:alanrogerson2
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
shalomc earned 250 total points
ID: 17782090
you have to set a timer in javascript and use the xmlhttprequest method to get an updated copy of the xml file.

see how google do this in gmail.

ShalomC
0
 
LVL 16

Assisted Solution

by:ellandrd
ellandrd earned 250 total points
ID: 17784407
0
 

Author Comment

by:alanrogerson2
ID: 17817928
I used AJAX but stil had the caching problem.  I ended up loading the xml file with a random number parameter at the end of the URI.  This seems like a bit of a cheat to me but it works.  

Thanks for all your help.
0
 
LVL 16

Expert Comment

by:ellandrd
ID: 17817970
>>bit of a cheat

never ;-)

thanks for the points

Ellandrd
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now