AnsweredAssumed Answered

Extent-based spatial query on FeatureLayer made from featureCollectionObject

Question asked by jay.gregory on Jan 8, 2014
Latest reply on Jan 9, 2014 by jay.gregory
I have created a FeatureLayer based on a featureCollectionObject (i.e. not from a service URL), and I would like to perform a spatial query on it.  The documentation claims that it "does not support queries that need to be performed on the server, e.g. queries with a where clause or non-extent based spatial queries."  So according to this, it should support an extent based spatial query.  However, when I construct my query:

var query = new Query(); query.geometry = pointToExtent(map, evt.mapPoint, 20);

and try to execute, I get the following error message: "FeatureLayer::selectFeatures - query contains one or more unsupported parameters."

I have tried changing the query.spatialRelationship attribute (from the default INTERECTS to CONTAINS or WITHIN) but that doesn't help.  There are no other aspects to the query - no where clause or time clause or anything other than the geometry (which I've set to an extent).  Can someone help me execute this query correctly?