<?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 cancelled:layerview-create error in view.whenLayerView() in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cancelled-layerview-create-error-in-view/m-p/1639721#M87484</link>
    <description>&lt;P&gt;I have the following code to create and load a GraphicsLayerView. When the user navigates away from the tab while the map is rendering, which triggers ngOnDestroy() to destroy the mapView, it receives the &lt;STRONG&gt;cancelled:layerview-create error. &lt;/STRONG&gt;Can this error be safely ignored or there's a better way to handle it? Thanks.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const func = () {
    const subject$ = new Subject&amp;lt;void&amp;gt;();
    this.layer = this.service.createGraphicsLayer().layer;
    this.service.loadGraphicsLayer(this.map, this.layer).subscribe(() =&amp;gt; {
      this.mapView.whenLayerView(this.layer).then((lv: __esri.GraphicsLayerView) =&amp;gt; {
        this.layerView = lv;
        subject$.next(void 0);
        subject$.complete();
      })
      // .catch(error =&amp;gt; {
      //   if (error.name !== 'cancelled:layerview-create') {
      //     throw error;
      //   }
      // });
    });
    return subject$;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Logging exception stacktrace for full details:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;OL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;_s&amp;nbsp;&lt;SPAN class=""&gt;{&lt;SPAN class=""&gt;name: &lt;SPAN class=""&gt;'cancelled:layerview-create', &lt;SPAN class=""&gt;details: &lt;SPAN class=""&gt;{…}, &lt;SPAN class=""&gt;message: &lt;SPAN class=""&gt;'layerview creation cancelled'}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;OL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;details&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;{&lt;SPAN class=""&gt;layer:&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;p7}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;message&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"layerview creation cancelled"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;name&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"cancelled:layerview-create"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;[[Prototype]]&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;e4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 06 Aug 2025 15:39:48 GMT</pubDate>
    <dc:creator>Ma1h</dc:creator>
    <dc:date>2025-08-06T15:39:48Z</dc:date>
    <item>
      <title>cancelled:layerview-create error in view.whenLayerView()</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cancelled-layerview-create-error-in-view/m-p/1639721#M87484</link>
      <description>&lt;P&gt;I have the following code to create and load a GraphicsLayerView. When the user navigates away from the tab while the map is rendering, which triggers ngOnDestroy() to destroy the mapView, it receives the &lt;STRONG&gt;cancelled:layerview-create error. &lt;/STRONG&gt;Can this error be safely ignored or there's a better way to handle it? Thanks.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const func = () {
    const subject$ = new Subject&amp;lt;void&amp;gt;();
    this.layer = this.service.createGraphicsLayer().layer;
    this.service.loadGraphicsLayer(this.map, this.layer).subscribe(() =&amp;gt; {
      this.mapView.whenLayerView(this.layer).then((lv: __esri.GraphicsLayerView) =&amp;gt; {
        this.layerView = lv;
        subject$.next(void 0);
        subject$.complete();
      })
      // .catch(error =&amp;gt; {
      //   if (error.name !== 'cancelled:layerview-create') {
      //     throw error;
      //   }
      // });
    });
    return subject$;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Logging exception stacktrace for full details:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;OL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;_s&amp;nbsp;&lt;SPAN class=""&gt;{&lt;SPAN class=""&gt;name: &lt;SPAN class=""&gt;'cancelled:layerview-create', &lt;SPAN class=""&gt;details: &lt;SPAN class=""&gt;{…}, &lt;SPAN class=""&gt;message: &lt;SPAN class=""&gt;'layerview creation cancelled'}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;OL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;details&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;{&lt;SPAN class=""&gt;layer:&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;p7}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;message&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"layerview creation cancelled"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;name&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"cancelled:layerview-create"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;[[Prototype]]&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;e4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Aug 2025 15:39:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cancelled-layerview-create-error-in-view/m-p/1639721#M87484</guid>
      <dc:creator>Ma1h</dc:creator>
      <dc:date>2025-08-06T15:39:48Z</dc:date>
    </item>
  </channel>
</rss>

