QueryParameters ReturnGeometry Not Honored

1150
7
10-17-2017 05:30 PM
ChadYoder1
Occasional Contributor II

I have a feature service that contains polygons.  When I execute a query using QueryFeaturesAsync with QueryParameters that sets the ReturnGeometry = false I get an error:  "Error performing query operation".

If I do the same query using the REST API, I get the same error, unless I switch the query to not return geometries.

We tracked this down because only certain queries will cause this issue.  We think it has something to do with the shapes (maybe the # of vertices or true curves), but have not nailed it down yet.

The issue though is that even for the queries that work, the return features still have the geometries, although the flag was set the false.  This makes me think the flag is not being honored.

Anyone else see this issue?

0 Kudos
7 Replies
PreetiMaske
Esri Contributor

Hello Chad,

Two questions: What version on Quartz are you using? 

Are you using Manual Cache and using PopulateFromServiceAsync() to populate the data?

--Preeti

0 Kudos
ChadYoder1
Occasional Contributor II

v100.1

Not using PopulateFromServiceAsync(), using QueryFeaturesAsync on the feature table.

I can try that approach and let you know if you'd like.

0 Kudos
PreetiMaske
Esri Contributor

Ya, sure, try that 

0 Kudos
ChadYoder1
Occasional Contributor II

Pretti, that worked, and no geometry was returned.  I'll just have to code to handle online/offline a bit differently.

I did notice the results returned almost immediately using this approach vs. just calling QueryFeaturesAsync().  Is that expected?  Is the the most efficient way to query an online service?

Thanks.

0 Kudos
PreetiMaske
Esri Contributor

>"The issue though is that even for the queries that work, the return features still have the geometries, although the flag was set the false.  This makes me think the flag is not being honored."

This should not happen, I will look into it.

>I did notice the results returned almost immediately using this approach vs. just calling QueryFeaturesAsync().  Is that expected?  Is the the most efficient way to query an online service?

Well, that also should not happen, the response time should be same. Although with ManualCache, subsequent layer operations will be little faster as there is no http traffic to fetch the more data. 

Is it possible to share the service end point? Also share the code snippet that didn't work. I will give a closer look and let you know.

0 Kudos
ChadYoder1
Occasional Contributor II

Can I email you directly with this information?

0 Kudos
PreetiMaske
Esri Contributor

Sure, email me at pmaske@esri.com

0 Kudos