AnsweredAssumed Answered

ArcGIS Server MapService Query

Question asked by shaningesri on Dec 18, 2014
Latest reply on Dec 18, 2014 by shaningesri

I might classify this thread as a bug report.  The scenario is described below:

I created a JS application that does query on a MapService layer.  In the debugging, I got the value of the query.where  clause.  If I post this clause into the MapService layer's Where textbox, and then click the Query button, I can get respected results (e.g. a couple of dozens of records, which are the same as that in ArcMap's definition-query on the map layer in the map document).  This query clause is VERY long.  In my JS application,  I put a break-point in function showResults().  If the query clause is NOT too long, the code goes through smoothly.  However, if the clause is Too Long, it goes through without any break.  I would guess there is may be a bug in the API that may limits the length of whereClause.  If you have similar experience like that, please share  Thanks for your attention.

 

queryTask.execute(query, showResults);

...

 

function showResults(result) {

    var items = [];

    for (var i = 0, il = result.features.length; i < il; i++) {

         items.push(result.features[i].attributes);

    }

    ...

}

Outcomes