<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
So you want to display only the most recent vehicle positions?<br>
<br>
You can do that with a filter on the layer.<br>
I suspect you have a datastructure like:<br>
<tt>x double<br>
y double<br>
vehicleid integer<br>
timestamp datetime</tt><br>
<br>
You should have a filter like: <tt>"timestamp = (select top 1
timestamp from table where vehicleid = id)"</tt>.<br>
How this filter should look, depends on your database.<br>
I suspect you will have a hard time figuring this out (if it is even
possible) directly in MapGuide.<br>
I would advise you to add a column that indicates that this is the most
recent entry:<br>
<tt>mostrecent integer</tt><br>
<br>
then you can update the database upon arival of requests:<br>
<tt>update table set mostrecent = 0 where vehicleid=id</tt><br>
and insert<br>
<tt>insert into table (x,y,vehicleid,timestamp,mostrecent) values
(x,y,id,now(),1)</tt><br>
<br>
This will allow you to have a filter like this in your layer:<br>
<tt>"mostrecent = 1"</tt><br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Vishaal skrev:
<blockquote cite="mid:17881226.post@talk.nabble.com" type="cite">
  <pre wrap="">Hi Kenneth,

i am successful in displaying the points on a button click all at once. what
i want is that on the button click my points should get displayed one by one
as per the data and only the latest point should be visible. i am not able
to this part. can you help me with some code example?

thanks.


Kenneth Skovhede, GEOGRAF A/S wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">If you only have to consider the current position of vehicles, you can 
easily use a database.
Just add an x,y columns, and perhaps speed and other data to a table.
Then make a service that accepts coordinates from vehicles, and update 
the correct row in the database.

In MapGuide, make a layer that reads the x,y points, and perhaps color 
code according to speed.
You can then get away with refreshing the map periodically.

If you can read in the direction, you could throw in a rotation on a 
symbol in the layer.

Regards, Kenneth Skovhede, GEOGRAF A/S



Vishaal skrev:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi List,

i want to develop a vehicle tracking system using MGOS 1.2 and Visual
Studio
2005. if any one can guide me about how to start for the application,
then
it will be very helpful to me. thanks for all your support.
  
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>