Query not respecting layer's definition expression (4.X)

562
1
05-24-2017 01:16 PM
SamuelAbati
New Contributor III

Decided to post as a question as I'm not sure if it is a bug or something I'm missing.

I'm using subLayer.queryFeatures to return geometries of a MapImageLayer and then adding them to the map.

But, although I change the layer's definition expression prior to the query, it still returns features that aren't being displayed.

Is this the expected behavior? Can I easily workaround this?

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Samuel,

   You will likely have to add the sublayers definitionExpression to your queries where clause.

0 Kudos