Select to view content in your preferred language

Plot moving object location getting from RSS feed

994
6
05-07-2010 01:46 PM
RavinderGairola
Emerging Contributor
I am getting moving truck location via RSS feed and I have to plot that on Map similar to "Time rendered 5K run" sample.
The sample is on time aware layer though I am getting geo coordinates via RSS feed, would the TemporalRenderer object work with RSS feed also?

Any help will be appreciated.

Thanks
Tags (2)
0 Kudos
6 Replies
DasaPaddock
Esri Regular Contributor
It doesn't matter where the features come from. You can replace the GPX feed with an RSS feed. The important thing in that sample is that the FeatureLayer is using a FeatureCollection with LayerDetails that has TimeInfo with a startTimeField. See the fLyr_initializeHandler() function. You can change the startTimeField to whatever attribute you'll be setting in the Graphics you create.

If you're going to be tracking multiple trucks, you can set the trackIdField on the FeatureLayer to the attribute that identifies each truck.

Attatched is another sample that gets the latest photos from Flickr every 10 seconds.
0 Kudos
RavinderGairola
Emerging Contributor
Dasa,

Thanks for helping and providing a sample code.
0 Kudos
RavinderGairola
Emerging Contributor
Couple quesitons

1. Can I change image of latestObservationRenderer for each individual truck depending on some property of truck data like staus?

2. Can I also show different images of latestObservationRenderer depending on if truck is travelling from north to south or east to west or vice-versa or depending on geo coordinate patterns?

Thanks in advance
0 Kudos
DasaPaddock
Esri Regular Contributor
Yes, you can control which symbol is used by setting the latestObservationRenderer to any of the out-of-the box renderers or by implementing your own renderer.

Doc reference:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/renderers/package-detail.html
0 Kudos
RavinderGairola
Emerging Contributor
Thanks for the doc reference
0 Kudos
RavinderGairola
Emerging Contributor
Dasa,

With the help of your sample code and doc reference I am able to plot moving trucks with trailings.

The issue I am facing right now is some times observationRenderer symbol would display on top of  latestObservationRenderer image for respective truck.

1. Why would these two renderer be display at same location?
2. Is there a property I can set like zIndex so that latestObservationRenderer image should always be on top?

Thanks in advance
0 Kudos