Select to view content in your preferred language

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

2468
1
08-27-2015 02:50 AM
OliviaGill1
Emerging 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
Occasional Contributor

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