How can you return geometry with featureLayerView.queryFeatures?

06-20-2019 02:36 AM
New Contributor II


I am trying to get the geometry of a selected feature.

However when I do featureLayerView.queryFeatures, i get a result without geometry (but with attributes).

See the image for what I get returned:

As you can see the geometry is null - and I don't understand why.

My code is as follows:

Any help is appreciated.


0 Kudos
1 Reply
Occasional Contributor

Hi Daniel,

Have you tried using or setting the returnGeometry property of the "esri/tasks/support/Query" class to True? Here is some documentation with some known limitations: Query | ArcGIS API for JavaScript 4.11