Were you ever able to figure this one out? I created a generic gp with:
Parameter: Layers_to_Clip
Data Type: GPMultiValue:GPFeatureRecordSetLayer
Display Name Layers to Clip
Description: The layers to be clipped. Layers must be either feature or raster layers.
Direction: esriGPParameterDirectionInput
Default Value:
Parameter Type: esriGPParameterTypeRequired
Category:
I have tried everything I know to put in place of the Layers_to_Clip variable and it either fails or times out. Overall, all I do so far is:
var queryTask = new esri.tasks.QueryTask(layer.url + "/"+index);
var query = new esri.tasks.Query();
query.returnGeometry = true;
query.where = "1 = 1";
var featureSet = queryTask.execute(query);
dList = new dojo.DeferredList([featureSet]);
dList.then(handleQueryResults);
This gives me the layer results and in the handleQueryResults, I take the results and put them in an array. Has anyone done this before anywhere. Seems so simple to create a generic gp for exporting layers so you don't have to add a gp to every map service. Thanks.