private function gp_jobCompleteHandler(event:GeoprocessorEvent):void { if (event.jobInfo.jobStatus == JobInfo.STATUS_SUCCEEDED) { gp.getResultData(gp.submitJobLastResult.jobId, "Output_Feature_Class"); var resultMapUrl : String = "http://localhost:6080/arcgis/rest/services/GroupingAnalysis_102100_2/MapServer/jobs/" + event.jobInfo.jobId; var resultMapServiceLayer : ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(resultMapUrl); //resultMapServiceLayer.id = "gpLayerResult"; resultMapServiceLayer.visibleLayers = new ArrayList(['0']); map.addLayer(resultMapServiceLayer); } else { showErrorMessage(event.jobInfo.jobStatus); CursorManager.removeBusyCursor(); } }
I have created a geoprocessing service from the results of a Grouping Analysis (new at 10.1). I included a result map serivce in my gp service, but I have not been able to get it to show up in my web app. I can take the url built using the jobid and paste it into a web browser and see the map service, so I know it is being created.
private function processResultImageLayer(paramName:String):void { var lastExecutedJob:JobInfo = gp.submitJobLastResult; var resultImageLayer:GPResultImageLayer = gp.getResultImageLayer(lastExecutedJob.jobId, paramName); resultImageLayer.id = paramName; resultImageLayer.name = ("hiddenLayer_" + paramName); resultImageLayersOnMap.push(resultImageLayer); map.addLayer(resultImageLayer); layerOrderer.orderLayers(); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.