Select to view content in your preferred language

Time enables web service doesn't show all records in application

658
1
Jump to solution
08-28-2013 08:55 AM
DorothyMortenson
Deactivated User
Hello,
I have created a time info map service of our water rights.
http://arcgis.wrd.state.or.us/arcgis/rest/services/Dynamic/wr_qry_Time/MapServer

When I try to use it in my web map application, it doesn't show all of the polygons. I have changed the scale so it only shows up at 1:250000 to try to reduce the number of polygons needed at any one time. I have also change the map service to allow 5000 features instead of the default of 1000.

In my mxd, I selected a box that would be about the size the would be viewable in my application and I get about 450 records, so I don't think it's the number of polygons.

When I am in the JavaScript view from the map service (http://arcgis.wrd.state.or.us/arcgis/rest/services/Dynamic/wr_qry_Time/MapServer?f=jsapi) zoomed in a bit, I see all of the polygons.

I'm using Silverlight. Don't know why Im not getting all of the features. It seems I'm only getting the very large polygons, none of the "circle" polygons.



In silverlight:
<esri:FeatureLayer ID="POU By Time" Initialized="FeatureLayer_Initialized"               Url="http://arcgis.wrd.state.or.us/arcgis/rest/services/Dynamic/wr_qry_Time/MapServer/0"             Visible="False"  Opacity=".7" >


Any suggestions?
Dorothy
0 Kudos
1 Solution

Accepted Solutions
DorothyMortenson
Deactivated User
I was able to get in touch with tech support to solve this.

Here's the deal.

You don't get all the records if you use FeatureLayer.

You need to use this in combination with the ARCGISDynamicMapServiceLayer.

The FeatureLayer controls the time function, but the ARCGISDynamicMapServiceLayer controls the display.

Here's the code (fill in your own service url:

<esri:ArcGISDynamicMapServiceLayer ID="POU By Time"                                Url="http://.../wr_qry_Time/MapServer"                          Visible="True"  Opacity=".7"                           Initialized="ArcGISDynamicMapServiceLayer_Initialized"                          />                          <esri:FeatureLayer ID="POUFeatureLayer"                           Url="http://.../wr_qry_Time/MapServer/0"                      Visible="False"  Opacity=".7" OutFields="*" />  


and the codebehind for ArcGISDynamicMapServiceLayer_Initialized is:

 private void ArcGISDynamicMapServiceLayer_Initialized(object sender, EventArgs e)         {             ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer dynamicServiceLayer =                 sender as ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer;             if (dynamicServiceLayer.VisibleLayers == null)                 dynamicServiceLayer.VisibleLayers = GetDefaultVisibleLayers(dynamicServiceLayer);              TimeExtent extent = new TimeExtent(MyTimeSlider.MinimumValue, MyTimeSlider.MaximumValue);             MyTimeSlider.Intervals = TimeSlider.CreateTimeStopsByTimeInterval(extent, TimeSpan.FromDays(1826)); }

View solution in original post

0 Kudos
1 Reply
DorothyMortenson
Deactivated User
I was able to get in touch with tech support to solve this.

Here's the deal.

You don't get all the records if you use FeatureLayer.

You need to use this in combination with the ARCGISDynamicMapServiceLayer.

The FeatureLayer controls the time function, but the ARCGISDynamicMapServiceLayer controls the display.

Here's the code (fill in your own service url:

<esri:ArcGISDynamicMapServiceLayer ID="POU By Time"                                Url="http://.../wr_qry_Time/MapServer"                          Visible="True"  Opacity=".7"                           Initialized="ArcGISDynamicMapServiceLayer_Initialized"                          />                          <esri:FeatureLayer ID="POUFeatureLayer"                           Url="http://.../wr_qry_Time/MapServer/0"                      Visible="False"  Opacity=".7" OutFields="*" />  


and the codebehind for ArcGISDynamicMapServiceLayer_Initialized is:

 private void ArcGISDynamicMapServiceLayer_Initialized(object sender, EventArgs e)         {             ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer dynamicServiceLayer =                 sender as ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer;             if (dynamicServiceLayer.VisibleLayers == null)                 dynamicServiceLayer.VisibleLayers = GetDefaultVisibleLayers(dynamicServiceLayer);              TimeExtent extent = new TimeExtent(MyTimeSlider.MinimumValue, MyTimeSlider.MaximumValue);             MyTimeSlider.Intervals = TimeSlider.CreateTimeStopsByTimeInterval(extent, TimeSpan.FromDays(1826)); }
0 Kudos