Is it possible to carry out queryTask on a json string?

2158
1
08-27-2015 02:50 AM
OliviaGill1
New Contributor

So for examples instead of:

var queryTask = new QueryTask("http://arcgis/rest/services/live/SEARCH/MapServer/15");
         var query = new Query();
         query.returnGeometry = false;
         query.outFields = [
             "NAME"
];


         ];

I would do this:

var queryTask = new QueryTask(jsonString);
         var query = new Query();
         query.returnGeometry = false;
         query.outFields = [
             "NAME"
];


         ];

I can't seem to find any examples of it and just wondered if it's possible?

Thanks

Tags (2)
0 Kudos
1 Reply
spiskulaspiskula
New Contributor III

Depends on what do you expect there to be in the jsonString. I assume you are thinking about a serialized feature set? If so then the answer is 'no'.

The query actually needs to be passed on to arcgis server backend that runs the query operation for specified input conditions. Then returns the result to the client.

0 Kudos