Solved

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

Posted on 2006-10-21
4
365 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 33

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Installer 5 47
Show tab when enter div and change underline color 3 94
uploading Theme in Wordpressn - geting error 4 26
Record locking on classic ASP 3 40
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

730 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