_fLayer=layer as ArcGISDynamicMapServiceLayer; fLayer.timeOffset=300; fLayer.timeOffsetUnits="esriTimeUnitsMinutes"; fLayer.useMapTime=true;
Solved! Go to Solution.
Dear,
I'm tring to develop a timeslider that only shows data (from an ArcGISDynamiclayer), from a certain interval in time set by the user.
So depending on user-set values, the timeslider should only show data in a certain time window (user-begin to user-end) and not from the begintime to endtime of the full timeslider (which should remain the same, keeping the fullextent).
But how can I set this 'time-window'?
-I do not want to work with featurelayers as in http://help.arcgis.com/en/webapi/flex/samples/index.html#/Filtering_by_time/01nq0000003n000000/ because of the dataload which will become too slow.
-I would need a kind of layerdefinition that does not work on the geographical extent but on the time extent.
I tried via setting the time offset (for the first value):
_fLayer=layer as ArcGISDynamicMapServiceLayer; fLayer.timeOffset=300; fLayer.timeOffsetUnits="esriTimeUnitsMinutes"; fLayer.useMapTime=true;
But this runs, the slider indeed does not show anything in the first 300 min, but than all points (including points which occured in those 300 first minutes) are shown.
However, I am looking for a way to only have the timeslider playing data (cumulatively) which happened after those 300 minutes (not incl. the points from within those 300 minutes).
Any advise would be great!
Kindly
fLayer.timeDefinition = new TimeExtent(DatePicker1.selectedDate,DatePicker2.selectedDate);
Leen,
Are you sure that you can not use a featureLayer for that one layer and add it to the map only when you need to use the time slider? ESRI adds and remove FeatureLayers dynamically all the time in code like the search widget.