hzhu, thanks for the suggestion. Just tried it, and the service returns not empty feature classes. What could I be doing wrong in my code?
The result is saved in ArcGIS server jobs folder, and I can download it. However, the downloaded featrue classes contain no features when the gp service is called via REST. The same input parameters for the gp service result in not empty feature classes when called via SOAP.
Hello,I have a problem consuming a geoprocessing service with Extract Data task using javascript API and REST on ArcGIS Server 10.When consumed from a web app the service returns feature classes with no data. However, when consumed from ArcMap (also as a service) everything works fine.The task always finishes successfully.I modified the code from the javascript API samples page, and here it is: var clipLayers = []; if(dijit.byId('layer1').checked){clipLayers.push('TACKE_EM');} if(dijit.byId('layer2').checked){clipLayers.push('LINIJE_EM');} if(dijit.byId('layer3').checked){clipLayers.push('POVRSINE_EM');} if(clipLayers.length === 0 || map.graphics.graphics.length === 0){ alert('Select layers to extract and area of interest'); return; } var features =[]; features.push(map.graphics.graphics[0]); var featureSet = new esri.tasks.FeatureSet(); featureSet.features = features; var rasterFormat = "ESRI GRID - GRID"; var spatialReference = "MGI Balkans 7"; var params = {"Layers_to_Clip":clipLayers, "Area_of_Interest": featureSet, "Feature_Format": dijit.byId('formatBox').value, "Raster_Format" : rasterFormat, "Spatial_Reference" : spatialReference }; gp.submitJob(params, completeCallback , statusCallback,function(error){ alert(error); });What am I doing wrong?If you need additional info, please ask.Thanks in advance.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.