executeForIds not honoring returnGeometry = false

1435
2
09-09-2010 07:12 AM
by Anonymous User
Not applicable
Original User: Buddhatown

I am working on a proof on concept app where I need to return a very large number of points.  Possibly 500,000+ points.  I dont need to actually display them (the selected points), just capture some attributes of the points.  So, it would seem that using a querytask and executeForIds would be my best bet.  I does in fact work OK if I send a plain REST request against the layer. 

However, if I use Flex, it doesnt seem to honor returnGeometry = false.  If I look at the request that it sends to AGS, returngeometry is omitted completely, and the query fails (on a very very big selection).  If I add in returngeometry=false, that query will work and return the expected array of ID's.

This a bug or am I missing something? 

Thanks
J



var query:Query = new Query();
query.spatialRelationship = spatialRel.selectedItem.data;
query.geometry = geom;
query.returnGeometry = false;
queryTask.executeForIds(query, new AsyncResponder(onResult, onFault));
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: danj

J,

Something to try: in the map document the map service is based upon turn off the Shape field for the point layer you are querying.  This usually prevents geometry from returning in cases when I want it to.

Good Luck,
-Dan
0 Kudos
JasonHarris2
New Contributor III
I confirmed this to be a bug with 2.  Looks like they fixed it at 2.1

J,

Something to try: in the map document the map service is based upon turn off the Shape field for the point layer you are querying.  This usually prevents geometry from returning in cases when I want it to.

Good Luck,
-Dan
0 Kudos