Now we want to implement geoserver for vehicle tracking. Means we want to
retrive the values of longitude and lattitude of the vehicle from the
database. For this,the map should be reloaded without hitting any button by
retrieving the values of moving vehicle(these values r stored in particular
text file).
We need javascript code with ajax for reloading the map without hitting any
button and also the function will retrieve values from text file for every
timeout period.
Sorry to say but I need reply as soon as possible.
I'm not quite sure how your system works, but let me try by what I think I know...
So some service is updating a text file that contains all of the new points for the vehicle's positions? What you can do is write a little script that reads the text file and gathers all the new points, then will issue a WFS request that will insert the values into GeoServer. And there, automatically, GeoServer will render the new/updated image.
The trick is not rendering old data, I am assuming you want only the most recent points rendered. You could put a flag value on each feature marking it as 'old', or 'new' and use a WFS transaction Update request to essentially retire any existing (old) points, and then insert a the new one.
There are a few ways to go about doing this with GeoServer, but it all really depends on how you want it all to work and what your business rules are.
Brent Owens
(The Open Planning Project)
Bobby wrote:
Hi to Everyone,
Now we want to implement geoserver for vehicle tracking. Means we want to
retrive the values of longitude and lattitude of the vehicle from the
database. For this,the map should be reloaded without hitting any button by
retrieving the values of moving vehicle(these values r stored in particular text file).
We need javascript code with ajax for reloading the map without hitting any
button and also the function will retrieve values from text file for every
timeout period.
Sorry to say but I need reply as soon as possible.