Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
REReplaceNoCase help 1 43
youtube blocking politics 4 55
Magento: different theme for Pc and for mobile devices 4 32
Adding items to a C# list incrementally 5 30
Read about why website design really matters in today's demanding market.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

839 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