Select to view content in your preferred language

Display selective features from a layer?

2886
16
Jump to solution
08-12-2013 10:10 AM
JatinPatel
Regular Contributor
I have a layer (Not a feature layer). Is it possible to display only a few selected (based on a query) features from that layer on the map?
0 Kudos
16 Replies
JasonZou
Frequent Contributor
maxRecordCount is a read-only property which is carried over from the map service. The only way you can increase the limit is to change maxRecordCount of a map service using ArcGIS Server Manager or ArcCatalog. Once set and published, maxRecordCount cannot be changed. In addition, maxRecordCount can only be set at the map service level, not the feature layer level. I've had a hard time to find it out.

To ESRI development team: it's truely beneficial to be able to change maxRecordCount at both map service and feature layer level via JSAPI. One scenario we have experienced is that our app has to support both IE8 and other modern browsers. Since IE8 is much slower in Javascript execution, we have the need to limit maxRecordCount to 500 for IE8 users, and keep 1000 or even 2000 for other users.
0 Kudos
AlessioDi_Lorenzo
Emerging Contributor
maxRecordCount is a read-only property which is carried over from the map service. The only way you can increase the limit is to change maxRecordCount of a map service using ArcGIS Server Manager or ArcCatalog.


hi zj_zou,

this is what I've done and infact my queryTask returns results for more than 1000 features (the default value).

My problem is that when I use the objectids returned by the query in the layerDefinitions expression ( OBJECTID IN ('1','2',...) ) and the result of this filtering operation is grater than 1000, the respose from the server is a blank image

739 objectids passed in the definition expression:
[ATTACH=CONFIG]27585[/ATTACH]

1160 objectids passed in the definition expression:
[ATTACH=CONFIG]27586[/ATTACH]
0 Kudos
JasonZou
Frequent Contributor
The feature limit does not apply to featureLayer.queryIds. Here is the description of the method on ESRI API description.
Query for ObjectIds. There is no limit on the number of ObjectIds that are returned from the server.


But I believe the feature limit does apply to setDefinitionExpression.
0 Kudos
AlessioDi_Lorenzo
Emerging Contributor
Ok, does exist a way to go beyond this limitation?
For various reasons I have to use a dynamic map service layer to represent the buffer response

Thx
0 Kudos
JasonZou
Frequent Contributor
Not I know of. As far as I know, the only way is to increase the limit using ArcGIS Server Manager.
0 Kudos
AlessioDi_Lorenzo
Emerging Contributor

As far as I know, the only way is to increase the limit using ArcGIS Server Manager.


Of course, but this is NOT the problem, because the maxrecordcount variable affects the queryTask, while I'm trying to understand what happens using the query task results, in the form of a string, as argument of the IN clause in a layerDefinitions object.

Later I will try to post some code...
0 Kudos
AlessioDi_Lorenzo
Emerging Contributor
Solved using geoprocessing service with a result map
0 Kudos