Select to view content in your preferred language

Time Data Layers in Flex not showing (after adding time slider)

1120
4
07-26-2010 12:11 PM
JoeyGentry
Emerging Contributor
So I am trying to add a service with a time slider to my flex app. When I add the first layer as the service the timeInfo seems to be populated properly but I cant see anything (with or without adding a slider).  If I add the entire service it seems timeExtent get set but timeInterval and timeIntervalUnits is not set. I also cant see any layers this way. If I remove the slider from the map I can see the layer. So here is what I have now... Btw our services are publicly accessible.

Note: We have a Javascript version that seems to be running correctly.

<fx:String id="climateServiceURLTest">http://iidev.lib.uidaho.edu/ArcGIS/rest/services/climatologyMeteorologyAtmosphere/downscaledClimateScenarios_CSIRO/MapServer/0</fx:String>

private function climateService_loadHandler(event:LayerEvent):void
   {
    var timeInfo:TimeInfo = climateService.timeInfo;
    timeSlider.createTimeStopsByTimeInterval(timeInfo.timeExtent, 1, "esriTimeUnitsYears");
   }

<esri:Map id="map" logoVisible="false" openHandCursorVisible="false" load="onMapLoad();" timeSlider="{myTimeSlider}" styleName="mapStyle">
   <esri:extent>
    <esri:Extent xmin="-14698002" ymin="3937860" xmax="-10683056" ymax="7350879">
     <esri:SpatialReference wkid="102100" />
    </esri:Extent>
   </esri:extent>
   
   <esri:VETiledLayer
    id="basemap"
    culture="en-US"
    visible="true"
    mapStyle="road"
    key="AkuhsTwX03AdA6UqUp6o1kH66NkMLB034gwrbMAFAXzHUwf1Ag5FbnZbRd0TVpIQ" />

   <esri:ArcGISDynamicMapServiceLayer 
    id="climateService"
    url="{climateServiceURLTest}"
    load="climateService_loadHandler(event)">
   </esri:ArcGISDynamicMapServiceLayer>
  </esri:Map>

<esri:TimeSlider id="myTimeSlider"/>
Tags (2)
0 Kudos
4 Replies
DasaPaddock
Esri Regular Contributor
Hi Joey,

I took a look at this with a REST expert and was told that you'll need to publish a raster catalog as part of a geodatabase and to make sure that you have a Date field selected for the start time field. Currently your layers have no fields.

You may want to contact http://support.esri.com for more help with getting this set up.
0 Kudos
JoeyGentry
Emerging Contributor
Thanks! I'll look into this and see what we can do.
0 Kudos
JoeyGentry
Emerging Contributor
So we looked into this and changing our services in the way you mentioned is not viable for us. This is working fine in ArcMap and in javascript.

The link the the Javascript version is here. http://geoinfo8.lib.uidaho.edu/climateTest/

I cant figure this out. The flex version does work with the sample service I found here http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=TimeSliderPlayDynamic.
0 Kudos
JoeyGentry
Emerging Contributor
Ok so we figured it out. The extents were a bit messed up for whatever reason and we lost idaho near Africa (very tiny). We got it working now.
0 Kudos