<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add raster result to map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658508#M61420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I think the syntax issue is that what's returned by your GP service isn't a dynamicMapServiceLayer. I'm not sure which of the other "layer types" that you should use but I'm going to guess that it's mapImageLayer (which incorporates mapImage).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok great, thank you for the response.&amp;nbsp; So then I will change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;var normalslayer = new esri.layers.ArcGISDynamicMapServiceLayer(featureSet); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;var normalslayer = new esri.layers.MapImageLayer(featureSet); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then do you know the necessary code to add the image to the map?&amp;nbsp; Thank you!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 May 2013 19:53:40 GMT</pubDate>
    <dc:creator>StephenFricke</dc:creator>
    <dc:date>2013-05-03T19:53:40Z</dc:date>
    <item>
      <title>Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658503#M61415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would really appreciate it if someone could help me out.&amp;nbsp; Right now I have a geoprocessing tool that runs when someone specifies some parameters and selects an area of interest in a map service window.&amp;nbsp; The geoprocesing tool downloads netCDF climate data for that selected area of interest, and then converts the netCDF data into a raster.&amp;nbsp; When the tool is done running, I would like to add this raster to the map.&amp;nbsp; Does anyone know how I can do this?&amp;nbsp; I was figuring I would need to create a dynamic map service layer from the raster, and then add it to the map, but I am not quite sure how to go about this in the javascript.&amp;nbsp; Any help would be very much appreciated.&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 19:49:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658503#M61415</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2013-05-01T19:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658504#M61416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out the &lt;/SPAN&gt;&lt;A href="http://developers.arcgis.com/en/javascript/jssamples/gp_resultmapservice.html"&gt;Geoprocessing with result map service sample&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 21:17:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658504#M61416</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-05-01T21:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658505#M61417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; I saw this example as well.&amp;nbsp; I guess I am just not sure on how to get the correct url to my raster.&amp;nbsp; It appears in the example that there was a mapservice already created, I am not sure what the equivalent of "var mapserviceurl" would be for me?&amp;nbsp; My raster is just an output of the gp service that is being run.&amp;nbsp; I would like to create a map service layer with this raster.&amp;nbsp; Right now, I have set a parameter in my gp tool to be a file which leads to this raster.&amp;nbsp; When I use that file path as the url to make the map service layer it seems to be invalid.&amp;nbsp; Any ideas?&amp;nbsp; Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 17:16:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658505#M61417</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2013-05-02T17:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658506#M61418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I keep getting this syntax error that I can't seem to figure out.&amp;nbsp; The raster that I want to add to the map is a derived "raster dataset".&amp;nbsp; In the onTaskComplete function, I get the raster result with this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;gpTask.getResultData(jobInfo.jobId,"Output");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then in the onResultComplete fuction my code looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function onTaskResultComplete(paramResult) {

//retrieve the value of the parameter from the paramresult

var featureSet = paramResult.value.url;

var normalslayer = new esri.layers.ArcGISDynamicMapServiceLayer(featureSet); 

}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason the normalslayer is failing because of some syntax issue.&amp;nbsp; The featureSet variable is the correct url to where my raster dataset is located, so I am not sure what the problem is?&amp;nbsp; Any help is much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:52:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658506#M61418</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2021-12-12T03:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658507#M61419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the syntax issue is that what's returned by your GP service isn't a dynamicMapServiceLayer. I'm not sure which of the other "layer types" that you should use but I'm going to guess that it's mapImageLayer (which incorporates mapImage).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 22:08:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658507#M61419</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2013-05-02T22:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658508#M61420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I think the syntax issue is that what's returned by your GP service isn't a dynamicMapServiceLayer. I'm not sure which of the other "layer types" that you should use but I'm going to guess that it's mapImageLayer (which incorporates mapImage).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok great, thank you for the response.&amp;nbsp; So then I will change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;var normalslayer = new esri.layers.ArcGISDynamicMapServiceLayer(featureSet); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;var normalslayer = new esri.layers.MapImageLayer(featureSet); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then do you know the necessary code to add the image to the map?&amp;nbsp; Thank you!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 19:53:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658508#M61420</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2013-05-03T19:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658509#M61421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, not quite. It's a little more complicated than that. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*IF* mapImageLayer is the correct layer type to use (and again, I'm not sure it is), you would construct your layer something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var stormPrecipMi = new esri.layers.MapImage({
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'extent': { 'xmin': -125.721041648, 'ymin': 45.1377145386, 'xmax': -119.246964944, 'ymax': 51.0722848511, 'spatialReference': { 'wkid': 4326 }},
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'href': "http://radar.weather.gov/ridge/RadarImg/NTP/ATX_NTP_0.gif"
&amp;nbsp; });
&amp;nbsp; stormPrecipMi.height = 550;
&amp;nbsp; stormPrecipMi.width = 600;
&amp;nbsp; stormPrecipMi.scale = 1;
&amp;nbsp; 
&amp;nbsp; nwsStormPrecipLayer = new esri.layers.MapImageLayer({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 'nwsStormPrecip',
&amp;nbsp;&amp;nbsp; opacity: 0.5
&amp;nbsp; });

&amp;nbsp; nwsStormPrecipLayer.addImage(stormPrecipMi);
&amp;nbsp; map.addLayer(nwsStormPrecipLayer,7);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that you'll need to know the coordinate extent of your results (but you should know that since you're passing a shape or extent to your GP service, right?). Place the URL returned from your GP results where I have the URL under the 'href' parameter in the mapImage constructor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully someone else more knowledgable will chime in and confirm whether or not mapImageLayer is the right path to take.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:52:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658509#M61421</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-12T03:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658510#M61422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;No, not quite. It's a little more complicated than that. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;*IF* mapImageLayer is the correct layer type to use (and again, I'm not sure it is), you would construct your layer something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var stormPrecipMi = new esri.layers.MapImage({
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'extent': { 'xmin': -125.721041648, 'ymin': 45.1377145386, 'xmax': -119.246964944, 'ymax': 51.0722848511, 'spatialReference': { 'wkid': 4326 }},
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'href': "http://radar.weather.gov/ridge/RadarImg/NTP/ATX_NTP_0.gif"
&amp;nbsp; });
&amp;nbsp; stormPrecipMi.height = 550;
&amp;nbsp; stormPrecipMi.width = 600;
&amp;nbsp; stormPrecipMi.scale = 1;
&amp;nbsp; 
&amp;nbsp; nwsStormPrecipLayer = new esri.layers.MapImageLayer({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 'nwsStormPrecip',
&amp;nbsp;&amp;nbsp; opacity: 0.5
&amp;nbsp; });

&amp;nbsp; nwsStormPrecipLayer.addImage(stormPrecipMi);
&amp;nbsp; map.addLayer(nwsStormPrecipLayer,7);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Note that you'll need to know the coordinate extent of your results (but you should know that since you're passing a shape or extent to your GP service, right?). Place the URL returned from your GP results where I have the URL under the 'href' parameter in the mapImage constructor.&lt;BR /&gt;&lt;BR /&gt;Hopefully someone else more knowledgable will chime in and confirm whether or not mapImageLayer is the right path to take.&lt;BR /&gt;&lt;BR /&gt;Steve&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey Steve, thanks for that code snippet.&amp;nbsp; I am still unable to get anything added to the map.&amp;nbsp; I don't get any errors, but I get a warning, "Resource interpreted as Image but transferred with MIME type image/tiff".&amp;nbsp; Not really sure what I should be doing different?&amp;nbsp; If you have any idea I let me know.&amp;nbsp; Thanks again!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:52:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658510#M61422</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2021-12-12T03:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658511#M61423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Known values: gif | jpg | png | bmp&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, I'm stretching my knowledge base a bit with this so I'm really hoping someone from ESRI can chime in! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt;&lt;SPAN&gt; 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?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 21:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658511#M61423</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2013-05-03T21:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658513#M61425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just wanted to bump this up in hopes that anyone might have a suggestion.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 19:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658513#M61425</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2013-05-06T19:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Add raster result to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658512#M61424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;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:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Known values: gif | jpg | png | bmp&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Again, I'm stretching my knowledge base a bit with this so I'm really hoping someone from ESRI can chime in! &lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; 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?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey Steve, thank you so much.&amp;nbsp; 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.&amp;nbsp; Here is the lead up to my gp service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function initSelectionToolbar(myMap){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectionToolbar = new esri.toolbars.Draw(map);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(selectionToolbar, "onDrawEnd", function(geometry) {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectionToolbar.deactivate();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 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]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = new esri.Graphic(geometry, symbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var geoPoly= esri.geometry.webMercatorToGeographic(geometry);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //map.graphics.add(graphic);
&amp;nbsp; xmax= (geoPoly.xmin*-1);
&amp;nbsp; xmin= (geoPoly.xmax*-1);
&amp;nbsp; ymin= (geoPoly.ymin);
&amp;nbsp; ymax= (geoPoly.ymax);

 selectNameModelVal = document.getElementById('options1').value;
&amp;nbsp;&amp;nbsp; 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);
&amp;nbsp; dojo.connect(gpTask, "onError",onTaskFailure);
&amp;nbsp; dojo.connect(gpTask, "onStatusUpdate",onTaskStatus);
 gpTask.submitJob(params);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So then when the job completes it goes to this function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function onTaskComplete(jobInfo) {

&amp;nbsp;&amp;nbsp;&amp;nbsp; /*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");
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So remember, this "Output", is a "raster dataset" which the gp service produces.&amp;nbsp; Then I can retrieve the location of where that raster dataset has been saved using this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function onTaskResultComplete(paramResult) {

&amp;nbsp;&amp;nbsp; //retrieve the value of the parameter from the paramresult

&amp;nbsp;&amp;nbsp; var featureSet = paramResult.value.url;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have visited this "featureSet" url, and it is the correct location, but it does appear to be a .tif file.&amp;nbsp; When I run the gp service in arcgis it produces a raster dataset which I can analyze in arcmap.&amp;nbsp; 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?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:52:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-raster-result-to-map/m-p/658512#M61424</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2021-12-12T03:52:09Z</dc:date>
    </item>
  </channel>
</rss>

