AnsweredAssumed Answered

maxRecordCount property of ArcGISDynamicMapServiceLayer

Question asked by greenkarmic on May 13, 2015
Latest reply on May 13, 2015 by greenkarmic

Hi,

 

esri/layers/ArcGISDynamicMapServiceLayer has a maxRecordCount property like this:

 

 

<Number> 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

                    });

 

  1. GET request parameters of Query:
  2. Query String Parametersview sourceview URL encoded
    1. f:json
    2. where:
    3. returnGeometry:true
    4. spatialRel:esriSpatialRelIntersects
    5. 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}}
    6. geometryType:esriGeometryPolygon
    7. inSR:32187
    8. outFields:Matricule
    9. outSR:32187

Outcomes