eTime Widget time interval problem

1353
17
Jump to solution
04-05-2012 03:07 PM
RhettZufelt
MVP Frequent Contributor
Below is the MapService time info for my "layer":

Time Info:  Start Time Field: Year_of_Trans End Time Field: N/A Track ID Field: N/A Time Extent: [2010/01/01 08:00:00 UTC, 2015/01/01 08:00:00 UTC] Time Zone: Pacific Standard Time    Respects Daylight Saving: False Time Interval: 1 (esriTimeUnitsYears) Export Options:   Use Time: True Time Data Cumulative: False Time Offset: 0


My Year_of_Trans field only has 4 digit years from 2010 to 2015.  In ArcMap, the time slider, set to 1 years interval will step through 1 year at a click/slide.

However, in the FlexApp, for the first three years, there are two clicks/slides per interval and in the last two years, there are only one.  (I.e., starts by displaying the 2010 data, to get to display 2011 data, need to click on the next arrow TWICE.  Same for 2011-2013.  Then, there is only 1 click for 2014 and 2015).  Also, the only values in my time field is the 4 digit year, yet somehow, when you "slide" the slider, it is putting in months, day, year and even time???  Not sure how/where it is interpolating that information from, but is probably related to my issue.

Does the eTime slider only work with time fields of a particular type or is it supposed to work with same types as ArcMap slider?  I started with a date field type, but could never get just a 4 year only to go, so have tried with both numeric and text fields, but have the same issues with all.

Any ideas?

R_
Tags (2)
0 Kudos
17 Replies
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   In version 2.5.1.1 the datatip on the slider skin automatically uses the data format that you specify in the xml file for that layer so you don't have to worry anymore about updating the skin manually.
0 Kudos
RhettZufelt
MVP Frequent Contributor
Thanks again, and nice enhancement.

However, the "datatip" (assuming that is the text box on the slider window itself) does now honor my xml settings.  However, if I grab the slider and move it to a position manually, the pop-up info/tip still has Jan 1, YYYY at 12:00 AM.

If I make the mod on the slider skin, it will then just show the year itself and doesn't "create" the day/time info (see attached photos).


R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Strange... On my end the Datatip (what you get when you move the slider manually) does follow the dateformat. Did you replace ALL your files with the new ones in the download. There is a change to the skin that does not work without a change made to the widget mxml.
0 Kudos
RhettZufelt
MVP Frequent Contributor
Thought I had changed all files, so tried again, but no change to result.

So, thought maybe it was something I had done that was conflicting, so imported a brand new flexapp, added eTime widget, and have the same issues.

So, thought maybe it was related to using the pre-release 3.

Created a brand new 2.5 viewer project and brought in the eTime widget (even removed the normal Time widget module).  Same issue.  So, far, the only way I can get it to have the slider value year only is to make the change to the timeSliderSkin.mxml format string.

Wonder if I'm missing something in my config xml or something (still using xml from previous post)??

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Well, I don't have a clue why it's not working for you. In the eTimeWidget.xml init function these lines pass the dateformat from the xml file to the slider component:

if (dateFormat){
                        myDateFormatter.formatString = dateFormat;
                        timeSlider.setStyle('dateFormat',dateFormat);
                    }


Then in the TimeSliderSkin.mxml I use this line to get that info and set the Dateformatter:

<fx:Declarations>
        <!--- @private -->
        <mx:DateFormatter id="dateFormatter" formatString="{hostComponent.getStyle('dateFormat')}"/>
    </fx:Declarations>
0 Kudos
RhettZufelt
MVP Frequent Contributor
Robert,

Thanks Robert,

I made the changes you mentioned, and the DataTip is now following my Date format.  I also re-checked the zip file you posted earlier with the update and I do not see the changes in the files in the zip.

Have cleared all my browser cache, etc. in case I was re-downloading a cached version and still don't see them.  Think maybe the zip file didn't get updated properly.

Thanks again,

Rhett
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   OK that's where the disconnect is. I only added those changes to the download from the gallery after I posted the zip file.
0 Kudos
RhettZufelt
MVP Frequent Contributor
Pretty easy to narrow down after you posted the changes to the code and I couldn't find it in my copy.

Worked out better this way anyway.  I learn a lot more about the way these modules interact when I get to see the changes to the code rather than just an updated version.

Thanks again for your time/help,

Rhett
0 Kudos