How can you return geometry with featureLayerView.queryFeatures?

343
1
06-20-2019 02:36 AM
DanielChristensen1
New Contributor II

Hello,

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:

https://pastebin.com/rnzu38aA

Any help is appreciated.

//Daniel

0 Kudos
1 Reply
DavidWilson3
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