<?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: Can't get MapImage to display in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153023#M14269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, I noticed that it happens to any of these NWS mapImage overlays. I just wish I knew how to correct it!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Feb 2013 15:15:08 GMT</pubDate>
    <dc:creator>SteveCole</dc:creator>
    <dc:date>2013-02-05T15:15:08Z</dc:date>
    <item>
      <title>Can't get MapImage to display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153018#M14264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want to add some weather service radar overlays to my app. Originally, I was hoping to add them via a KML/KMZ as provided by &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://radar.weather.gov/ridge/kmzgenerator.php" rel="nofollow" target="_blank"&gt;this NWS site.&lt;/A&gt;&lt;SPAN&gt; After reading the API documentation about KMLLayers, i concluded that this type of KML layer might not be supported (image overlay). That led me to the MapImage layer and I'm having no luck getting the image to display.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While investigating the guts of the NWS KML file, I see that it's simply a georeferenced GIF file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]21185[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noted the lat/long extents, along with the image dimensions and have tried implementing a simple example with no success. So what am I missing??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THANKS!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html&amp;gt; &amp;nbsp; &amp;lt;head&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=7,IE=9"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--The viewport meta tag is used to improve the presentation and behavior of the samples&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on iOS devices--&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Map Image Test&amp;lt;/title&amp;gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body, #map { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding:0; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin:0; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height:100%; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;var dojoConfig = {parseOnLoad: true};&amp;lt;/script&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/"&amp;gt;&amp;lt;/script&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.map"); &amp;nbsp;&amp;nbsp; dojo.require("esri.layers.MapImageLayer"); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var map; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.ready(function() {&amp;nbsp; &amp;nbsp; var initExtent = new esri.geometry.Extent({ &amp;nbsp;&amp;nbsp;&amp;nbsp; "xmin": -13592500, &amp;nbsp;&amp;nbsp;&amp;nbsp; "ymin": 6060280, &amp;nbsp;&amp;nbsp;&amp;nbsp; "xmax": -13506825, &amp;nbsp;&amp;nbsp;&amp;nbsp; "ymax": 6166129, &amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": {"wkid": 3857} &amp;nbsp; }); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("map", { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; basemap: "streets", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extent:initExtent &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp; &amp;nbsp; // Define the NWS Radar Layer &amp;nbsp; var radarMi = new esri.layers.MapImage({ &amp;nbsp;&amp;nbsp;&amp;nbsp; 'extent': { 'xmin': -125.725156, 'ymin': 45.222770, 'xmax': -119.252062, 'ymax': 51.156440, 'spatialReference': { 'wkid': 4326 }}, &amp;nbsp;&amp;nbsp;&amp;nbsp; 'href': "http://radar.weather.gov/ridge/RadarImg/N0R/ATX_N0R_0.gif" &amp;nbsp; }); &amp;nbsp; radarMi.height = 550; &amp;nbsp; radarMi.width = 600; &amp;nbsp; radarMi.scale = 1; &amp;nbsp;&amp;nbsp; &amp;nbsp; var nwsRadarLayer = new esri.layers.MapImageLayer(); &amp;nbsp; nwsRadarLayer.addImage(radarMi); &amp;nbsp;&amp;nbsp; &amp;nbsp; map.addLayer(nwsRadarLayer); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt; &amp;nbsp; &amp;lt;/head&amp;gt; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;lt;body class="claro"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="map"&amp;gt;&amp;lt;/div&amp;gt; &amp;nbsp; &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 22:01:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153018#M14264</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2013-01-29T22:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get MapImage to display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153019#M14265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looks like we probably introduced a bug with 3.3. The issue is that adding a MapImageLayer to a map before the map's onLoad event has fired doesn't work. This is because the MapImageLayer checks that images have a spatial reference that matches the map's (or is something that can be converted client side like wgs84 to web mercator or vice versa). The workaround is to wait for the map to load before adding the MapImageLayer:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/FCx4Q/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/FCx4Q/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll look into this further and, if it's a bug, I'll log it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 01:29:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153019#M14265</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-01-30T01:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get MapImage to display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153020#M14266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Derek. That did the trick and now the image displays. I feel somewhat special having stumbled across a bug &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One issue I'm having as I try and incorporate this back into a more complex app I'm developing. From a certain LOD out, the image is displayed in its correct location. From that certain LOD inward, however, the image begins to shift westward and continues to shift further westward with each successive zoom in. If I reverse course and zoom back out, the image will get closer and closer back to where it is supposed to be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope to have a live public version I can link to within 2 weeks but for now here are a couple screenshots which show the problem. "ZoomLevel01" shows the mapImageLayer in its correct spatial location. After I zoom my map in one level, I get "zoomLevel02." As you can see, the image has now shifted westward.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm stumped as to what may cause this because my app uses the same basemap and initial extent as what I originally posted in the simple example (and what's used in your fiddle).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thoughts, guesses?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]21217[/ATTACH][ATTACH=CONFIG]21218[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 16:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153020#M14266</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2013-01-30T16:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get MapImage to display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153021#M14267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the live link for the "drifting" overlay I was previously describing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gismaps.snoco.org/fws/"&gt;http://gismaps.snoco.org/fws/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Load the page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Under the "Show Me' dropdown, click the checkbox for Radar Image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now zoom out one level. Note where the radar returns are.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Zoom out again one level. Watch the radar returns drift &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;back&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; eastward.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Zoom out one more level. This represents the true spatial position of the overlay.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 15:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153021#M14267</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2013-02-04T15:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get MapImage to display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153022#M14268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you zoom in farther, you'll notice that the image gets squeezed horizontally instead of shifted. Try this by turning on the 1 hour precipitation layer, panning to Cape Flattery, and zooming in a few more levels.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 15:05:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153022#M14268</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-02-05T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get MapImage to display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153023#M14269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, I noticed that it happens to any of these NWS mapImage overlays. I just wish I knew how to correct it!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 15:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-get-mapimage-to-display/m-p/153023#M14269</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2013-02-05T15:15:08Z</dc:date>
    </item>
  </channel>
</rss>

