Is your geoprocessing service published as asynchronous?Does your geoprocessing service expose at least the following three input parameters (with these exact names): Area_of_Interest, LLayers_to_Clip, Feature_Format.
Task: Extract Data Task Display Name: Extract Data Task Category: Help URL: http://lab-arcgis-10/arcgisoutput/beta/ExtractDataTask.htm Execution Type: esriExecutionTypeAsynchronous Parameters: Parameter: Area_of_Interest Data Type: GPFeatureRecordSetLayer Display Name: Area of Interest Direction: esriGPParameterDirectionInput Default Value: Geometry Type: esriGeometryPolygon Spatial Reference: Fields: FID (Type: esriFieldTypeOID, Alias: FID) Shape (Type: esriFieldTypeGeometry, Alias: Shape) Id (Type: esriFieldTypeInteger, Alias: Id) Shape_Length (Type: esriFieldTypeDouble, Alias: Shape_Length) Shape_Area (Type: esriFieldTypeDouble, Alias: Shape_Area) Parameter Type: esriGPParameterTypeRequired Category: Parameter: Feature_Format Data Type: GPString Display Name: Feature Format Direction: esriGPParameterDirectionInput Default Value: File Geodatabase - GDB - .gdb Parameter Type: esriGPParameterTypeRequired Category: Choice List: File Geodatabase - GDB - .gdb Shapefile - SHP - .shp Autodesk AutoCAD - DXF_R2007 - .dxf Autodesk AutoCAD - DWG_R2007 - .dwg Bentley Microstation Design (V8) - DGN_V8 - .dgn Parameter: Output_Zip_File Data Type: GPDataFile Display Name: Output Zip File Direction: esriGPParameterDirectionOutput Parameter Type: esriGPParameterTypeRequired Category: Parameter: Layers_to_Clip Data Type: GPMultiValue:GPString Display Name: Layers to Clip Direction: esriGPParameterDirectionInput Default Value: ComunidadesParameter Type: esriGPParameterTypeRequired Category: Supported Operations: Submit Job Supported Interfaces: REST
I'm not able to select the layers at Data Extract Widget. Although I've setted the "layers to clip" on the model the "choice list" on rest appear empty.
gp = new esri.tasks.Geoprocessor("http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/UKOGLTools/GPServer/Extract Data Task"); gp.setOutSpatialReference({wkid:27700});
function showTResults(results){ dojo.forEach(results, function(result) { var graphic = result.feature; var fMarkerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1), new dojo.Color([0, 255, 0, 0.25])); var fLineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 3); var fPolygonSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_NONE, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25])); switch (graphic.geometry.type) { case "point": graphic.setSymbol(fMarkerSymbol); break; case "polyline": graphic.setSymbol(fLineSymbol); break; case "polygon": graphic.setSymbol(fPolygonSymbol); break; } map.graphics.add(graphic); }); ext = esri.graphicsExtent(graphic); };
var dlFormat = 'Shapefile - SHP - .shp'; var params2 = { "Layers_to_Clip": clipLayers, "Area_of_Interest": ext, "Feature_Format": dlFormat } esri.show(loading); gp.submitJob(params2, completeCallback, statusCallback, function(error){ alert(error); esri.hide(loading) });
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.