Select to view content in your preferred language

maxRecordCount, FeatureDataGrid and cacheOnDemand

2170
1
03-13-2013 07:20 AM
MichaelBlom
New Contributor III
Hi there,

I have a point feature service (set to draw onDemand, cacheOnDemand set to false) and this is bound to a FeatureDataGrid.  I have set the maxRecordCount to 500, but when I pan around, the FeatureDataGrid regularly shows >500 records. 

I imagine there's some cacheing of points going on here, despite cacheOnDemand being set to false, and I've also played around with setting OnDemandCacheSize to 0.

It's very frustrating, I'd just like my points on my map to match the points dataset shown in the FeatureDataGrid.

Has anyone else come across this before?  ESRI folk, could you run a few tests on this scenario?

Thanks,
Mike
0 Kudos
1 Reply
MichaelBlom
New Contributor III
Ok, I did some fiddling around, and where I first zoomed in, there were 250 locations/records. I zoomed out one level, and I had 750. So, 500 (maxRecordCount) + 250 previous records.
The 250 records, I don't know why they stick around

my second query after I zoom out looks this....
returnGeometry=true&geometryType=esriGeometryEnvelope&geometry=%7b%22xmin%22%3a-8805.68551715063%2c%22ymin%22%3a6719290.84264458%2c%22xmax%22%3a-3823.9267493046%2c%22ymax%22%3a6721235.04387989%2c%22spatialReference%22%3a%7b%22wkid%22%3a102100%7d%7d&inSR=102100&spatialRel=esriSpatialRelIntersects&where=OBJECTID+NOT+IN+(56127526%2c57999809%2c58216651%2c58330806%2c64600604%2c64600605%2c64600767.....

the key stuff is in bold above.  The query will not re-select any previously selected records, those records will stick around on the client and an extra 500 will be pulled back from the server.

my FeatureService is configured with this, I would have thought one of these parameters would stop the caching aspect of the query (where=OBJECTID+NOT+IN...):

<Mode>OnDemand</Mode>
<DisableCaching>true</DisableCaching>
<OnDemandCacheSize>0</OnDemandCacheSize>

I guess what I want is to be able to say "there will never be more more than x number of records on the map"
0 Kudos