TimeSlider only draws Cumulatively

847
8
11-02-2011 05:45 PM
SeraWhite
New Contributor III
I am using Flex API 2.4 and I cannot get the layer to NOT draw cumulatively.  The layer is not set to draw cumulatively in the ArcMap document the service is built on.  I have tried using both a Feature Layer and an ArcGISDynamicMapServiceLayer.  The layer I am using has a start and end time.  I would like the feature to disappear after its end time.  It works fine in the ArcMap document.  I have seen this issue elsewhere but the answers all say that it was a bug that would be fixed in 2.4.  Any suggestions anyone?
Thanks
Sera White
Tags (2)
0 Kudos
8 Replies
SeraWhite
New Contributor III
Ok, I am thinking maybe I need to refresh my feature layer (or dynamicMapServiceLayer) on timeExtentChange. I am just having some issues setting the timeExtentChange event on the timeslider.
<esri:TimeSlider id="myTimeSlider" enabled="{fLayer.loaded}" timeExtentChange="myTimeSlider_timeExtentChange(myTimeSlider.timeExtent)"/>
It doesn't like the red portion and I am really unsure what to put there....can anyone help?
Sera White
0 Kudos
SeraWhite
New Contributor III
Am I not making any sense?  I can't believe others are not having this issue?

Sera  White
0 Kudos
by Anonymous User
Not applicable
Hi Sera. Are you still having this issue? I believe I am having a very similar problem. I'm JUST starting to learn Flex, so I'm not sure if I am coding something wrong or not. Basically, like you, I have not set the layers to draw cumulatively. Yet that is exactly what they are doing in my time slider. I have also noticed that when the layers draw, they are one day off from the date I have set in the Date field. Very strange! Does anybody have any good answers for this?
0 Kudos
SeraWhite
New Contributor III
I do still have the problem.  I was pulled onto another project.  I will be hitting this project again in a couple of weeks.  I am really surprised that no one else has the problem.

I also am new in Flex.  But I think that we need to somehow redraw the map each time the timeslider increments.  That is what I was working on when I got sidetracked.

Sera
0 Kudos
tanyabisen
New Contributor
Hi Sera,

as far as I understood your problem you do not need to show the data cumulatively..If you set your timslider property as singleThumbAsTimeInstant=true..it displays data one by one..

I hope this helps.

Regards,
Tanya
0 Kudos
SeraWhite
New Contributor III
Fantastic!  That worked.  Thank you very much for the help!
Sera
0 Kudos
by Anonymous User
Not applicable
Tanya,

I have tried what you suggested, but whenever I add this line of code, my layers do not draw at all! I am very confused. This is the code I am using.

<configuration>

    <dateformat>MMMM DD, YYYY</dateformat>
    <loop>false</loop>
    <singlethumbastimeinstant>true</singlethumbastimeinstant>
    <thumbcount>1</thumbcount>
    <createTimeInstant>false</createTimeInstant>
    <thumbmovingrate>1000</thumbmovingrate>
    <timeextent>
        <starttime>1863/11/23 4:59:00 UTC</starttime>
        <endtime>1863/11/26 4:59:00 UTC</endtime>
    </timeextent>
    <timestops>
        <timestopsinterval>1</timestopsinterval>
        <timestopsunits>days</timestopsunits>
    </timestops>

</configuration>


Any ideas on what I'm doing wrong?
0 Kudos
DasaPaddock
Esri Regular Contributor
When using time instants, they have to be exact matches for the feature's start time field if you only have a start time field and no end time field.
0 Kudos