Hi,
esri/layers/ArcGISDynamicMapServiceLayer has a maxRecordCount property like this:
<<A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" style="color: #00629b;" rel="nofollow noopener noreferrer">Number</A>> maxRecordCount
The maximum number of results that can be returned from query, identify and find operations. Requires ArcGIS Server version 10.1 or greater. (Added at v2.6)
I expected this property to override the maxRecordCount set in the map service (which is 1000 by default).
My problem is that right now I set this maxRecordCount property to 100 but when I make a spatial query on the layer 1000 results are returned anyway.
Also when inspecting the request of the query I don't see this limit of 100 anywhere in the query parameters.
We are using ArcGIS Server 10.1 and version 3.13 of the JavaScript API
Did I misunderstand or doing something wrong?
Thanks
Code:
this.dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(parameters.url, {
opacity: parameters.opacity,
maxRecordCount: parameters.maxRecordCount
});
- GET request parameters of Query:
- Query String Parametersview sourceview URL encoded
- f:json
- where:
- returnGeometry:true
- spatialRel:esriSpatialRelIntersects
- geometry:{"rings":[[[271363.347754655,5137593.251916758],[287039.4222343921,5137593.251916758],[287039.4222343921,5126301.73822563],[271363.347754655,5126301.73822563],[271363.347754655,5137593.251916758]]],"spatialReference":{"wkid":32187}}
- geometryType:esriGeometryPolygon
- inSR:32187
- outFields:Matricule
- outSR:32187