Pass feature set to Geoprocessing Service

1119
1
12-02-2013 11:33 AM
JonathanMeyer
New Contributor
Can someone please explain how to pass a feature set as an input parameter to a geoprocessing task?  I have a custom gp service with an input of type GPFeatureRecordSetLayer.  From what I understand I need to send an esri.tasks.FeatureSet.  My users are drawing a polygon and this should be the input to the gp service.  Everything I have tried results in the call  to the service failing.
0 Kudos
1 Reply
JasonZou
Occasional Contributor III
Try to build the geoprocessing parameter as below, and feed it to the geoprocessing service:

      var features = [];
      features.push(inPolygon);
      var geoParam = new esri.tasks.FeatureSet();
      geoParam.features = features;


Here is a sample from ESRI.
0 Kudos