+ Reply to Thread
Results 1 to 2 of 2

Thread: QueryTask not showing results when it should

  1. #1
    Ray Duke
    Join Date
    Jan 2012
    Posts
    44
    Points
    0
    Answers Provided
    2


    0

    Default QueryTask not showing results when it should

    In regards to the following thread: http://forums.arcgis.com/threads/552...rytask+results

    I was unable to get anything back from the query I am getting a NULL error on the fault handler.

    Code:
             var queryTask:QueryTask = new QueryTask(queryLayer);
    	 queryTask.disableClientCaching = true;
    	 var query:Query = new Query();
    	 query.outFields = queryFields.split(",");
    	 query.geometry = map.extent;							
    	 query.returnGeometry = true;
    	 query.where = queryExpr;
    	 query.outSpatialReference = map.spatialReference;
    	 queryTask.execute(query, new AsyncResponder(onResult, onFault));

  2. #2
    Ray Duke
    Join Date
    Jan 2012
    Posts
    44
    Points
    0
    Answers Provided
    2


    0
    This post is marked as the answer

    Default Re: QueryTask not showing results when it should

    I figured it out... My services was 9.3 framework based. I just added the line of code: queryTask.useAMF = false; and it worked.

    Resulting code:

    Code:
    	var queryTask:QueryTask = new QueryTask(queryLayer);
    					queryTask.disableClientCaching = true;
    					var query:Query = new Query();
    					query.outFields = queryFields.split(",");
    					query.geometry = map.extent;							
    					query.returnGeometry = true;
    					query.where = queryExpr;
    					queryTask.useAMF = false;
    					query.outSpatialReference = map.spatialReference;
    									
    					queryTask.execute(query, new AsyncResponder(onResult, onFault));

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts