FeatureLayer::selectFeatures - query contains one or more unsupported parameters

3077
1
Jump to solution
10-05-2015 09:46 AM
GregKnight
Occasional Contributor

I am building on my earlier post where I created a feature layer on the client from a Feature Collection.

I need to be able to select feature(s) from the layer with a where clause.  I am able to select them with featureLayer.selectFeatures -- if I omit the where clause and use only objectIds.  If I try to use a where clause, I get an error that my query contains one or more unsupported parameters.

This code snippet illustrates the issue:

var query = new Query();
query.where = "bl_id = 'B-US-MA-1001'";
//query.objectIds = [0];
featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW);

This jsFiddle demonstrates the behavior:

Edit fiddle - JSFiddle


What am I missing?

Thank you.

PS.  I might add that using the query.where approach works just fine when I have a feature layer that was created from an ArcGIS source.  The real issue arises when I build the feature layer on the client from a Feature Collection.

0 Kudos
1 Solution

Accepted Solutions
GregKnight
Occasional Contributor

Argh.

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.

Sadness.  Guess I'll need to tackle this another way...

View solution in original post

1 Reply
GregKnight
Occasional Contributor

Argh.

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.

Sadness.  Guess I'll need to tackle this another way...