Select to view content in your preferred language

spacial query; can I get geometry from a graphic object?

836
2
12-06-2010 06:34 AM
EricAndersen2
Emerging Contributor
I have a graphic object returned from a featureset that represents a county. I need to run a spacial query with the geometry of the returned county. If the object is a graphic how do I extract the geometry of the graphic so I can use that geometry in a spacial query??

This doesn't work...

private function doQuery(orCounty:Graphic):void
   {
    try
    {
    
    
     var queryParcel:Query = new Query();
     queryParcel.spatialRelationship = Query.SPATIAL_REL_WITHIN
     queryParcel.geometry = orCounty.geometry
     queryParcel.returnGeometry = true;
     queryTaskParcel.execute(queryParcel, new AsyncResponder(onResult, onFault));
Tags (2)
0 Kudos
2 Replies
DasaPaddock
Esri Regular Contributor
This looks OK. Is it calling onResult or onFault? Have you tried using a tool like HttpFox to verify the request and response?
0 Kudos
EricAndersen2
Emerging Contributor
This looks OK. Is it calling onResult or onFault? Have you tried using a tool like HttpFox to verify the request and response?


No I haven't tried HttpFox. I will install it. However I can say that the query finishes "onResult." There does not appear to be any problem expect that it returns an incorrect answer.
0 Kudos