Ok, well, that's good to know. I looked at the API reference for mapImage and TIFF is not one of the supported data types:
Known values: gif | jpg | png | bmp
To use the mapImageLayer option, your GP result would have to return an image in one of those other formats. This might be a catch-22 for you IF you want the user to be able to query (i.e. display an infoWindow) the cell values. Sadly, mapImageLayers don't support this.
Again, I'm stretching my knowledge base a bit with this so I'm really hoping someone from ESRI can chime in!
Steve
EDIT: I'm starting to think Derek is right (I really shouldn't doubt is suggestions!). Can you post more of your code, specifically the lead up to your GP service and then the callback routine for the results?
Hey Steve, thank you so much. I do want to be able to query cell values, so I agree that the Image Layer is probably not the avenue I want to go. Here is the lead up to my gp service:
function initSelectionToolbar(myMap){
selectionToolbar = new esri.toolbars.Draw(map);
dojo.connect(selectionToolbar, "onDrawEnd", function(geometry) {
selectionToolbar.deactivate();
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]));
var graphic = new esri.Graphic(geometry, symbol);
var geoPoly= esri.geometry.webMercatorToGeographic(geometry);
//map.graphics.add(graphic);
xmax= (geoPoly.xmin*-1);
xmin= (geoPoly.xmax*-1);
ymin= (geoPoly.ymin);
ymax= (geoPoly.ymax);
selectNameModelVal = document.getElementById('options1').value;
selectNameScenarioVal = document.getElementById('options2').value;
selectNameVariableVal = document.getElementById('options3').value;
selectNameDay1Val = document.getElementById('options4').value;
selectNameDay2Val = document.getElementById('options5').value;
selectNameYear1Val = document.getElementById('options6').value;
NormalsYears = document.getElementById('options7').value;
var gpTask = new esri.tasks.Geoprocessor("http://inside-dev2.nkn.uidaho.edu:6080/arcgis/rest/services/REACCH/MACAnormsRas/GPServer/MACA%20Normals%20Histogram-%20raster%20output");
var params = { "GCM_Model":selectNameModelVal, "GCM_Scenario":selectNameScenarioVal, "Variable":selectNameVariableVal,"Day_1":selectNameDay1Val,"Day_2":selectNameDay2Val, "Year_1":selectNameYear1Val, "Number_of_years_to_average_to_create_climate_normals":NormalsYears,"Min_Lat":ymin,"Max_Lat":ymax,"Min_Lon":xmin,"Max_Lon":xmax };
dojo.connect(gpTask, "onJobComplete",onTaskComplete);
dojo.connect(gpTask, "onError",onTaskFailure);
dojo.connect(gpTask, "onStatusUpdate",onTaskStatus);
gpTask.submitJob(params);
});
}
}
So then when the job completes it goes to this function:function onTaskComplete(jobInfo) {
/*get the value of an output parameter Buffer_polygons using getResultData. The name of the output may vary in your gpTask*/
var gpTask = new esri.tasks.Geoprocessor("http://inside-dev2.nkn.uidaho.edu:6080/arcgis/rest/services/REACCH/MACAnormsRas/GPServer/MACA%20Normals%20Histogram-%20raster%20output");
dojo.connect(gpTask,"onGetResultDataComplete",onTaskResultComplete);
gpTask.getResultData(jobInfo.jobId,"Output");
So remember, this "Output", is a "raster dataset" which the gp service produces. Then I can retrieve the location of where that raster dataset has been saved using this code:function onTaskResultComplete(paramResult) {
//retrieve the value of the parameter from the paramresult
var featureSet = paramResult.value.url;
I have visited this "featureSet" url, and it is the correct location, but it does appear to be a .tif file. When I run the gp service in arcgis it produces a raster dataset which I can analyze in arcmap. Do you think it is possible I have to define this output parameter as something different than "raster dataset" when I am originally creating the tool in arcgis?