Select to view content in your preferred language

Getting all elements of a service layer

550
3
04-14-2011 01:53 PM
RobertMartin2
Deactivated User
Hi all,

I have a rather basic question. I am using an dynamic map service in my app. I would like to query a layer in this service to retrieve *all* elements, so that the user can choose which will be displayed. Is there some sort of wildcard operator I can use in my AGSFindTask? Or a better way to do this altogether?

Thank you in advance,
Robert
0 Kudos
3 Replies
DiveshGoyal
Esri Regular Contributor
Can you clarify what you mean by " retrieve *all* elements".
Are you referring to all the features in that service? Or all metadata about the service?
0 Kudos
RobertMartin2
Deactivated User
I meant all the features in a layer. In the meantime I'm using AGSIndentifyTask with a tolerance that includes all of the features, but I imagine there is more systematic way of doing this. Any thoughts?

Thank you.
0 Kudos
DiveshGoyal
Esri Regular Contributor
That is one way.

Another way is to use the AGSQueryTask and execute a SQL query (such as "1=1") to get all the features from a particular layer. You'd have to do this for every layer in the service whose features you want.

Note, the number of features returned by query and identify task are limited by the 'max record count' setting on the service. At version 10, it defaults to 1000 features. You may need to bump it up if you want to retrieve more features in a single request.
0 Kudos