Select to view content in your preferred language

How to make querytask return featureset with polygon geometry?

551
4
05-28-2010 01:01 PM
CarmenDurham
Frequent Contributor
Hello,

This should be an easy question but I can't figure it out.

I have an app where the user chooses an address.  Based on the x,y location of the address, a query task is performed on a parcel layer to return the parcel number for the one parcel.  All works great there.

So, in the parcel query, I get a featureSet returned which is one polygon.  How to I get to the graphic of the polygon for the FeatureSet.feature[0]?   I just can't seem to get to it.

I want to take the polygon graphic and use it's geometry to perform another query on the Flood Zone Layer.  I want the whole polygon boundary vs just a point.

Thanks,
Carmen
City of Greenville, SC
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Carmen,

   Try
FeatureSet.features[0]
0 Kudos
CarmenDurham
Frequent Contributor
Thanks Robert.  That was actually a typo on my part in the forum posting.  But your answer did indicate I was on the right track.  I could NOT get the query to work with the parcel that was returned from a previous query.  Spent all morning trying to figure out what I was missing.

Turns out that I forgot to set the queryParcel.returnGeometry = true  so that I could use the parcel geometry in a subsequent query.  Finally realized this when I used Fiddler to see what was being passed.

Duh.

I looked (briefly) but could not see how to give anyone credit for a response in the new forums.   I know you can tell me how (or if that isn't possible anymore). 

Thanks,
Carmen Durham
City of Greenville, SC
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Carmen,

    ESRI has still not worked out the point system in this new forum as well as other important issues like actually getting and email notification when someone replys to a watched thread.:(
0 Kudos
CarmenDurham
Frequent Contributor
Robert,
Or important things like being able to find what you need!  I spend WAYYYY more time trying to find something than I did before.  Instead of two places I normally searched before, it seems like I have to bumble through many more locations.

Thanks for keeping watch on the forums and answering our questions!
0 Kudos