Select to view content in your preferred language

Flex viewer 2.4 : Geo Processing = Raster Image Not Overlay

2129
5
08-01-2011 12:03 AM
MohdShah
Deactivated User
Hi All ,

I try new geo processing widget in Arcgis Viewer 2.4 and connect to my geoprocessing , all connection and input parameter successful but output return in download raster image .

That image output suppose to be overlay in map not in downloaded file .


Here is my widget xml file
<?xml version="1.0"?>
<configuration label="">
    <description/>
    <taskurl>http://172.16.1.132/ArcGIS/rest/services/HotSpot_Adjustable/GPServer/HotSpot</taskurl>
    <helpurl>http://server01/arcgisoutput/HotSpot_Adjustable/HotSpot.htm</helpurl>
    <inputparams>
        <param name="Jenayah"
               label="Jenayah"
               required="true"
               type="string"
               visible="true">
            
        </param>
       <param name="Pilih_PBT"
               label="Pilih PBT"
               required="true"
               type="string"
               visible="true">
            
        </param>
        <param name="Pilih_Bulan"
               label="Pilih_Bulan"
               required="true"
               type="string"
               visible="true">
            
        </param>
         <param name="Clip_Sempadan_PBT"
               label="Sempadan_PBT"
               required="true"
               type="string"
               visible="true">
            
        </param>
         <param name="Use_Input_Features_for_Clipping_Geometry"
               label="Use Input Features for Clipping Geometry"
               required="true"
               type="string"
               visible="true">
            
        </param>
    </inputparams>
    <outputparams>
        <param name="Hasil_Hot_Spot"
               geometrytype="featurerecordset"
               label="Hasil_Hot_Spot"
               required="true"
               type="rasterdatalayer"
               visible="true"><!--
            <renderer type="simple">
                <defaultsymbol alpha="0.5"
                               color="0xFF00FF"
                               type="simplefill">
                    <outline width="1" color="0x000000"/>
                </defaultsymbol>
            </renderer>
        -->
        </param>
    </outputparams>
    <layerorder>Base,Hasil_Hot_Spot</layerorder>
</configuration>


-->


and here is what output parameters from geoprocessing

Parameter: Hasil_Hot_Spot

    Data Type: GPRasterDataLayer
    Display Name: Hasil Hot Spot
    Direction: esriGPParameterDirectionOutput
    Parameter Type: esriGPParameterTypeRequired
    Category:


Is there anything I missing
Tags (2)
0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Mohd,

   Have you tried rasterdatalayer as the output type?
0 Kudos
MohdShah
Deactivated User
Mohd,

   Have you tried rasterdatalayer as the output type?

Sorry , I paste wrong widget.xml ,actually originally is rasterdatalayer in my widget.xml
0 Kudos
Juan_CarlosFranco
Esri Contributor
Currently, adding raster images to the map is not supported. The default behavior is to download the result image.

Do you have a map service associated with your geoprocessing service?
0 Kudos
MohdShah
Deactivated User
Currently, adding raster images to the map is not supported. The default behavior is to download the result image.

Do you have a map service associated with your geoprocessing service?

Yes I have, that service is base on map.

Are there any way that i can overlay that raster after finish that geoprocessing .
0 Kudos
Juan_CarlosFranco
Esri Contributor
Then, if your Geoprocessing task is asynchronous, you could add the following to the processResult function in GeoprocessingWidget.mxml:

else if (resultDataType == GPParameterTypes.GP_RASTER_DATA_LAYER)
                {
                    var jobInfo:JobInfo = gp.submitJobLastResult;
                    if (jobInfo)
                    {
                        var resultImageLayer:GPResultImageLayer = gp.getResultImageLayer(jobInfo.jobId, parameterValue.paramName);
                        map.addLayer(resultImageLayer);
                    }
                }


Please note that you would need to manage any layers being added to the map.
0 Kudos