Identify Task and Temporal Layers

Discussion created by joshua.corcoran on Jul 8, 2011
Latest reply on Jul 8, 2011 by JNery-esristaff
I have an application that has on Cached Map Service and One Dynamic Map Service (Time Enabled) Published. We are running ArcGIS Server 10.02 SP2. When I attempt to perform an identify on the temporal layer and I use the LayerOption = LayerOption.all results will be returned but for all layers not just the visible ones. When I used LayerOption = LayerOption.visible and specify lets says layer 2 and 6 (identifyParams.LayerIds.AddRange(new int[] { 2,6 }) I always return zero results. Always. Enclosed is the code that I am using.

priavte void myMap_MouseClick(object sender, Map.MouseEventArgs e)
 var identifyParameters = new IdentifyParameters();
 identifyParameters.LayerOption = LayerOption.visible;
 identifyParameters.MapExtent = MyMap.Extent;
 identifyParameters.Width = (int)MyMap.ActualWidth;
 identifyParameters.Height = (int)MyMap.ActualHeight;
 identifyParameters.Geometry = e.MapPoint;
 identifyParameters.TimeExtent = MyMap.TimeExtent;
 identifyParameters.Tolerance = 15;
 identifyParameters.LayerIds.AddRange(new int[] { 2,6 });

 var task = new IdentifyTask("URL");
 var result = task.Execute(identifyParameters);

I have tried everything I can think of on this can anyone tell me what I am doing wrong. Please.

Joshua A Corcoran| Sr. Geospatial Software Developer
L-3 STRATIS Division "Powered by Excellence"
Fayetteville, NC 28303