Select to view content in your preferred language

FeatureLayer Cluster More Than 500 Points?

1601
12
06-17-2010 09:17 PM
RyanCoodey
Frequent Contributor
So I realize the ArcGIS Server has a limit of 500 features it can return (1,000 in v10)... We have multiple field locations and one field might have 20,000 points.  I was hopeing clustering would still show this large count in one bubble when zoomed further out... but it only shows bubbles till they add up to 500.  Is there no way to use clustering to show them all?

Thanks a lot!
0 Kudos
12 Replies
dotMorten_esri
Esri Notable Contributor
You can use the approach applied here: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SDSMap
The basic idea is to keep doing queries for the next 500 points until you don't get any more results back, and populate them in a graphics layer.
I've successfully had 25000 points in a cluster layer, with reasonable performance. However the big problem when dealing with that much data is that the client has to download all that data, and you probably don't want that. Are you really sure the user needs to deal with 20000 interactive points at once? My experience is that if you have more than ~100 features, you are already overloading the user with data to interact with.
0 Kudos
RyanCoodey
Frequent Contributor
Great, thanks Morten!  I will see about implementing it this way and see how performance is... The reason for this is that one of our web maps is called "Well Browser"... its purpose is for our users to be able to locate any well in the company either by zooming/paning around for it, or by using a find tool.  The current version just controls the well layer by a scale dependency... but our thought was, when zoomed out, even though there is 20,000 well points, they would all be clustered into one and they could zoom in on the clusters.  A neat way to see how many wells are in their aera of interest too!

Thanks again!
0 Kudos
dotMorten_esri
Esri Notable Contributor
I would use a dynamic service when zoomed out, so you can display all features. When you zoom further in you switch to the featurelayer. Set the featurelayer to be in OnDemand mode, and it will request features as needed while you pan around. That way you only load features the user wants to work with.
0 Kudos
RyanCoodey
Frequent Contributor
Ok, thanks for the advice...  I was thinking the exact opposite, zoomed out I wanted the cluster because otherwise it is just a mess of points (our current maps have a scale dependency to not even show them too far out) and then when zoomed in i was thinking to drop the graphics and use a dynamic layer to be able to see the detailed symbology of the points that represent their status.  Might just stick with not using clustering at all, will have to think/try some different things.  Thanks a lot!
0 Kudos
DavidLowther
Deactivated User
You can use the approach applied here: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SDSMap
The basic idea is to keep doing queries for the next 500 points until you don't get any more results back, and populate them in a graphics layer.


I put this into place and it worked well. One tweak I would offer is to update the FeatureLayer instead of an associated GraphicsLayer. This is troublesome if you use the Initialized event because you get the first 500 points twice (once by default FeatureLayer bahvior and once in the LoadFeatures). I modified it to use the UpdateCompleted event so the timer does not begin firing until after the first 500 are back - then I get the best of all worlds.
0 Kudos
RyanCoodey
Frequent Contributor
Cool, thanks for that tip Dave!

Also, I did not know you could change the max amount of features returned from an ArcGIS service... I changed it from 500 to 50000 and it queries the data fairly fast.  Better than grabbing 500 at a time and spinning through adding them to the collection.

For anyone that wants to change this setting (and didn't know about it like me), open the Server Manager, Edit the service, and on the Parameters Tab is "Maximum Number of Records Returned by Server".
0 Kudos
DavidLowther
Deactivated User
Cool, thanks for that tip Dave!


And thanks for yours. I am going to go find that setting and get rid of all this excess code I've written, cool or not!
0 Kudos
GaryBarden
Regular Contributor
Can anyone point me to something similar for .NET?
0 Kudos
MiriEshel
Esri Contributor
Hi Ryan,

I understand you've changed the maximum features returned from 500 to 50000.

Is it really 50,000 (and not 5,000) ?

How do you access this service? Lan or Wan?

Did you do cluster or regular queries? If you did clusters, wasn't it too heavy for the featureLayer to handle so many features?

Thanks a lot,

Miri Eshel,
Systematics LTD.
Israel
0 Kudos