<?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: Basemap Load Failure in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1280741#M80926</link>
    <description>&lt;P&gt;Can someone please help? I tried using a USGS and ESRI basemap as the default but it messes up the zoom level of the mapView. I REALLY need to find a way to default to a blank basemap. I've already tried using '' as the url and TileLayer as the type, but it errors out. What is the correct way to create a BLANK basemap?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 13:57:48 GMT</pubDate>
    <dc:creator>MichaelWen_Timmons</dc:creator>
    <dc:date>2023-04-20T13:57:48Z</dc:date>
    <item>
      <title>Basemap Load Failure</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278804#M80880</link>
      <description>&lt;P&gt;I saw a few, similar threads from a few years back that went unanswered so want to see if there's a solution now.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-basemap-not-working/m-p/619871#M57902" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-basemap-not-working/m-p/619871#M57902&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am trying to capture when a mapview's default basemap fails to load. If that happens I want to switch to a backup. Right now if the default basemap is down the whole application crashes.&lt;/P&gt;&lt;P&gt;I tried this but nothing is caught. In fact the 'when' never got run when the first basemap fails to load.&lt;/P&gt;&lt;P&gt;this.view.when( &amp;nbsp; &amp;nbsp;).catch()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not work for basemaps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; this.view.on("layerview-create-error", function(event) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; console.error("LayerView failed to create for layer with the id: ", event.layer.id);&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;Is there anything else that I can try?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 15:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278804#M80880</guid>
      <dc:creator>MichaelWen_Timmons</dc:creator>
      <dc:date>2023-04-14T15:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Basemap Load Failure</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278833#M80881</link>
      <description>&lt;P&gt;The Basemap, and other layers,&amp;nbsp; have a load props you can check.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadError" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadError&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadStatus" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadStatus&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadWarnings" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadWarnings&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could do something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(() =&amp;gt; {
    console.log("Check basemap error status", view.map.basemap.loadError)
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 15:54:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278833#M80881</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-04-14T15:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Basemap Load Failure</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278854#M80884</link>
      <description>&lt;P&gt;I don't think this would work because view.when(() would not even fire if the basemap layer fails to load.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 16:23:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278854#M80884</guid>
      <dc:creator>MichaelWen_Timmons</dc:creator>
      <dc:date>2023-04-14T16:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Basemap Load Failure</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278885#M80885</link>
      <description>&lt;P&gt;You can use reactiveUtils to watch those properties. I don't really have a way to check a bad basemap, but that would be the next step to try.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 17:48:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1278885#M80885</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-04-14T17:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Basemap Load Failure</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1279243#M80900</link>
      <description>&lt;P&gt;I already tried it. That does not really resolve it for us because the application crashes if the default basemap fails to load, so we won't even get a chance to watch for the property change.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 14:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1279243#M80900</guid>
      <dc:creator>MichaelWen_Timmons</dc:creator>
      <dc:date>2023-04-17T14:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Basemap Load Failure</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1279301#M80903</link>
      <description>&lt;P&gt;Is there a way for me to create a 'blank' basemap that I can use as a default, and after mapView is generated, switch to the real default if that layer loaded correctly? I tried creating a default basemap by passing a '' url but that threw an error as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 16:38:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1279301#M80903</guid>
      <dc:creator>MichaelWen_Timmons</dc:creator>
      <dc:date>2023-04-17T16:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Basemap Load Failure</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1280741#M80926</link>
      <description>&lt;P&gt;Can someone please help? I tried using a USGS and ESRI basemap as the default but it messes up the zoom level of the mapView. I REALLY need to find a way to default to a blank basemap. I've already tried using '' as the url and TileLayer as the type, but it errors out. What is the correct way to create a BLANK basemap?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 13:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-load-failure/m-p/1280741#M80926</guid>
      <dc:creator>MichaelWen_Timmons</dc:creator>
      <dc:date>2023-04-20T13:57:48Z</dc:date>
    </item>
  </channel>
</rss>

