<?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 map.load not failing when it probably should in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-load-not-failing-when-it-probably-should/m-p/675861#M62956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm testing offline fallback funtcionality for an app that loads the init.js script locally. I'm trying to catch the error. This works fine if I initialize using&amp;nbsp;a portalItem with a webMapID, but not if I use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var webMapConfig = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;basemap: "streets",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ground: "world-elevation"&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map = new WebMap( webMapConfig );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.load()&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;.otherwise( function( error ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// THIS IS NOT REACHED&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.error('map failed to load');&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;})&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;.then(function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // THIS IS REACHED&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log('map loaded');&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The map is completely failing to load (as expected), but for some reason load doesn't reject in 4.0 and 4.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug or by design?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Martijn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2016 19:28:36 GMT</pubDate>
    <dc:creator>Martijnvan_de_Rijdt</dc:creator>
    <dc:date>2016-10-04T19:28:36Z</dc:date>
    <item>
      <title>map.load not failing when it probably should</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-load-not-failing-when-it-probably-should/m-p/675861#M62956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm testing offline fallback funtcionality for an app that loads the init.js script locally. I'm trying to catch the error. This works fine if I initialize using&amp;nbsp;a portalItem with a webMapID, but not if I use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var webMapConfig = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;basemap: "streets",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ground: "world-elevation"&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map = new WebMap( webMapConfig );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.load()&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;.otherwise( function( error ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// THIS IS NOT REACHED&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.error('map failed to load');&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;})&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;.then(function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // THIS IS REACHED&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log('map loaded');&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The map is completely failing to load (as expected), but for some reason load doesn't reject in 4.0 and 4.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug or by design?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Martijn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 19:28:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-load-not-failing-when-it-probably-should/m-p/675861#M62956</guid>
      <dc:creator>Martijnvan_de_Rijdt</dc:creator>
      <dc:date>2016-10-04T19:28:36Z</dc:date>
    </item>
  </channel>
</rss>

