AnsweredAssumed Answered

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

Question asked by gknight on Oct 5, 2015
Latest reply on Oct 5, 2015 by gknight

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.

Outcomes