AnsweredAssumed Answered

Definition Query for FeatureLayer

Question asked by azatrain on Apr 19, 2015
Latest reply on Apr 21, 2015 by azatrain

I would like to perform a definiton query against a FeatureLayer that I've loaded into my map from a local geodatabase.  Reading through the help, it seems that definition queries are only supported against FeatureServiceLayers.  The FeatureLayerInfo object has the definitionExpression property, but takes a url to set the feature layer's endpoint.  So I don't see any way to get at the FeatureLayerInfo property for a FeatureLayer from a local geodatabase.

 

What I do see on a FeatureLayer is the setFeatureVisible property, which looks like it does the same sort of thing that a definition query would.  The problem here is I would have to do this one feature at a time.  That doesn't seem very efficient.

 

Hopefully I'm way off base here.  Does anyone have an example they could post showing how to do a definition query against a local gdb feature layer?

Outcomes