Simplify geometry returned from query task

948
3
09-09-2013 12:10 PM
MattCooper
Occasional Contributor
Is it possible to simplify the geometry of a feature(s) returned from a query task? For example, I would like to highlight the results of a query task, but some of the polygons are very detailed or very large and the query task task a long time.  I've thought about creating a "generalized" version of the dataset and having a 2nd map service just for query tasks, but was curious if there was a way to make the query task itself generalize the returned geometry.

Thanks,
Matt
3 Replies
ChristopherBlinn1
Occasional Contributor III
Have you taken a look at the API?

-Chris B.
0 Kudos
MattCooper
Occasional Contributor
Look at the API? No, i just like to blindly guess or ask you kind folks to look at it for me!

I don't think the generalize class that you linked to works with the query task as it mentions its for generalizing input geometry using the geometry service. But, I did notice that query task max allowable offset property, which I had missed before. Thanks for spurring me to take a second look at the API reference docs.

Thanks
0 Kudos
ChristopherBlinn1
Occasional Contributor III
Look at the API? No, i just like to blindly guess or ask you kind folks to look at it for me!


You'd be surprised how many don't look at it.

I too forgot about max allowable offset until you mentioned it.  I recently used the generalize class (on the featureSet feature graphics from a query task) when I could have easily used the max allowable offset parameter.  This is a more practical approach.  Seems we both learned something.

I appreciate the less sarcastic response.
0 Kudos