Select to view content in your preferred language

Time Aware map & ExportImage question

810
2
Jump to solution
01-16-2014 07:20 AM
TerryGiles
Frequent Contributor
Using JS API 3.5, ArcGIS server 10.1 -

I've published a map service containing a time aware layer (data are from a raster catalog in a file geodb) & have added a TimeSlider widget to my page.  When I move the slider, it always shows cumulative data which I don't want (the data are water inundation levels so it looks like the water never recedes).  Using the Time Slider in ArcMap the data draw correctly & I've checked the 'Display data cumulatively' checkbox on the layer's time properties is off. 

Using Firebug, I can see that when the user moves the slider in the web page, it's calling ExportImage with 2 date/times for the time parameter.  How do I get it to only request a single time?  I can do this manually and get the correct image.

Thank you,
Terry


Time Slider related code -
 dojo.connect(map, "onLayerAdd", function (layer) {  if (layer.id == "my animated layer") { timeSlider = new esri.dijit.TimeSlider({}, dojo.byId("timeSliderDiv"));  map.setTimeSlider(timeSlider);  timeSlider.setThumbCount(1); timeSlider.setThumbMovingRate(1500); //1.5 seconds between frames timeSlider.createTimeStopsByTimeInterval(layer.timeInfo.timeExtent, 6, 'esriTimeUnitsHours'); //6 hours matches steps set in ArcMap timeSlider.startup(); dojo.connect(timeSlider, "onTimeExtentChange", function (timeExtent) { dojo.byId('divTime').innerHTML = timeExtent.endTime; }); } }); 
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Terry,

   Set this:

timeSlider.singleThumbAsTimeInstant(true);


When true, the time slider displays features for the current point in time. When false cumulative data is displayed from the start time to the current thumb location. The default value is false.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Terry,

   Set this:

timeSlider.singleThumbAsTimeInstant(true);


When true, the time slider displays features for the current point in time. When false cumulative data is displayed from the start time to the current thumb location. The default value is false.
0 Kudos
TerryGiles
Frequent Contributor
Thank you Robert, not sure how I missed that reading the API refs...
0 Kudos