FeatureLayer not showing same data as ArcGISDynamicMapServiceLayer

869
3
08-30-2011 12:55 PM
Labels (1)
AndrewWeixel
New Contributor
I was doing some testing and noticed the following problem.

When I add this layer <esri:ArcGISDynamicMapServiceLayer ID="ND2" VisibleLayers="2" Url="http://ndgishub.nd.gov/ArcGIS/rest/services/All_GovtLands_State/MapServer" /> (note that it is only looking at layer id 2), it shows everything as expected.

However when I use a FeatureLayer like this <esri:FeatureLayer x:Name="FeatureLayer" ID="FeatureLayer" Url="http://ndgishub.nd.gov/ArcGIS/rest/services/All_GovtLands_State/MapServer/2" Color="DarkTurquoise" /> which is also just pointing to layer id 2 - it only returns about half of the shapes as the ArcGISDynamicMapServiceLayer.

What are the possible causes for this? We want to use the FeatureLayer.
0 Kudos
3 Replies
RyanCoodey
Occasional Contributor III
For FeatureLayers, ArcGIS Server 9.3 only returns 500 features by default and ArcGIS Server 10 only returns 1000.  By chance do you have more features than this?  This might be the issue.

If you open the "Properties" for your service and go to the "Parameters" tab on your service there is an option "Maximum Number of Records Returned by Server"... try making this bigger.  Careful though, because returning too many features can slow down or even crash your map.

Hope that helps some...
0 Kudos
AndrewWeixel
New Contributor
Thanks, that might be the problem.  My example has over 1,000 features.

Can you provide any links that will give me some insight of how to deal with high feature content?  We have a few layers with about 30,000 features.  How do you display that much data when there is a 1,000 feature limit? 

I'm new to this sort of programming by the way, sorry if this question is too rudimentary.
0 Kudos
RyanCoodey
Occasional Contributor III
I would try these two items:

1) In the ArcGIS Server Manager, open the "Properties" for your service and go to the "Parameters" tab.  There is an option "Maximum Number of Records Returned by Server"... try making this something like 30,000.

2) In your WPF app, use a clusterer on the FeatureLayer.  See this example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SimpleClusterer

Notes:
- Now if you do return all 30,000 records when the map loads, it might take 10+ seconds or so, so you might want to show some type of loading bar (and make sure your users are ok with this delay).
- Also, if the FeatureLayer.Mode is set to OnDemand, I would set the OnDemandCacheSize to around 30,000 too to prevent trips back to the server.
- If you do NOT use the clusterer with this many points, it will likely lock up your application... just too much for the client to render.
- And if you do not need any of the benefits of FeatureLayers (MapTips, Clustering, Client Side Filtering, etc), then by all means, just use an ArcGISDynamicMapServiceLayer.
- Search both the WPF and Silverlight forums (Silverlight API is practically the same as the WPF), there are other topics on this... Morten, one of the API developers created OnDemandMapTips which are nice to help the initial load time.

These are just some of the things I have tried and found, others might have other opinions and ideas�?� Hope this helps a little.
0 Kudos