<?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: Problems re-adding a GroupLayer to a map after it has been removed in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175388#M77389</link>
    <description>&lt;P&gt;&lt;STRIKE&gt;The problem that we will run into is access to the services listed in the pen.&amp;nbsp; I am pretty sure that you will not be able to access the services used so you may need to add some ESRI services to replicate the issue.&amp;nbsp; The services are U/V NAVGEM data for winds with wind speed for the raster stretch color layer and U/V WW3 lvl 0 for the waves.&amp;nbsp; Hopefully there are already active services that will replicate these.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;I used the services from your pen and the problem persists.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/ostrya/pen/YzeVNQx?editors=1111" target="_blank" rel="noopener"&gt;FlowRenderer layer switch test (codepen.io)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This pen replicates the issue with the necessary basic functionality, some of which is probably unnecessary but it has been added in the interest of best replicating the situation.&amp;nbsp; The control div shows up to the right of the visible screen, so you will need to scroll over to access it.&amp;nbsp; Toggling on the wave layer will add the waves then toggling the winds back on will fail to add the winds and produce the error in the previously attached image.&lt;/P&gt;&lt;P&gt;Here is the error from the codpen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"[esri.views.2d.layers.imagery.ImageryView2D]" // [object Object] 
{
  "name": "TypeError",
  "details": {
    "stack": "TypeError: Cannot read properties of undefined (reading 'symbolize')\n    at z.A.symbolize (https://js.arcgis.com/4.23/esri/layers/support/RasterWorker.js:469:453)\n    at u.D._onInvokeMessage (https://js.arcgis.com/4.23/esri/core/workers/init.js:111:462)\n    at u._invoke (https://js.arcgis.com/4.23/esri/core/workers/init.js:105:336)\n    at u.D._process (https://js.arcgis.com/4.23/esri/core/workers/init.js:105:135)"
  },
  "message": "Cannot read properties of undefined (reading 'symbolize')"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 00:27:21 GMT</pubDate>
    <dc:creator>Brandon-Ellis</dc:creator>
    <dc:date>2022-05-19T00:27:21Z</dc:date>
    <item>
      <title>Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1174849#M77353</link>
      <description>&lt;P&gt;We are using ImageryLayers with AnimatedFlow vectors and a RasterStretchRenderer for color control in a GroupLayer (winds and wind speed) along with another&amp;nbsp; ImageryLayers with AnimatedFlow vectors (waves) to be displayed at different times.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use a button to toggle the two layers.&amp;nbsp; The winds are the default layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When waves are activated, the winds layer group is removed and the waves layer is added (windWaveSwitch.JPG).&lt;/P&gt;&lt;P&gt;Toggling to waves works as expected/intended, but toggling to winds triggers an error (windWaveError.JPG).&amp;nbsp; Toggling the waves back on displays the waves and toggling back to the wind causes the error again.&lt;/P&gt;&lt;P&gt;The initial map.add happens when the layers are established (windWaveCode.JPG).&amp;nbsp; The windWave variable is string value of 'Wave' at that point in the code.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 22:02:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1174849#M77353</guid>
      <dc:creator>Brandon-Ellis</dc:creator>
      <dc:date>2022-05-17T22:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175120#M77368</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you set up a simple codepen app to showcase this? You can set it up using any layer as long as it shows the issue. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 15:46:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175120#M77368</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-05-18T15:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175388#M77389</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;The problem that we will run into is access to the services listed in the pen.&amp;nbsp; I am pretty sure that you will not be able to access the services used so you may need to add some ESRI services to replicate the issue.&amp;nbsp; The services are U/V NAVGEM data for winds with wind speed for the raster stretch color layer and U/V WW3 lvl 0 for the waves.&amp;nbsp; Hopefully there are already active services that will replicate these.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;I used the services from your pen and the problem persists.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/ostrya/pen/YzeVNQx?editors=1111" target="_blank" rel="noopener"&gt;FlowRenderer layer switch test (codepen.io)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This pen replicates the issue with the necessary basic functionality, some of which is probably unnecessary but it has been added in the interest of best replicating the situation.&amp;nbsp; The control div shows up to the right of the visible screen, so you will need to scroll over to access it.&amp;nbsp; Toggling on the wave layer will add the waves then toggling the winds back on will fail to add the winds and produce the error in the previously attached image.&lt;/P&gt;&lt;P&gt;Here is the error from the codpen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"[esri.views.2d.layers.imagery.ImageryView2D]" // [object Object] 
{
  "name": "TypeError",
  "details": {
    "stack": "TypeError: Cannot read properties of undefined (reading 'symbolize')\n    at z.A.symbolize (https://js.arcgis.com/4.23/esri/layers/support/RasterWorker.js:469:453)\n    at u.D._onInvokeMessage (https://js.arcgis.com/4.23/esri/core/workers/init.js:111:462)\n    at u._invoke (https://js.arcgis.com/4.23/esri/core/workers/init.js:105:336)\n    at u.D._process (https://js.arcgis.com/4.23/esri/core/workers/init.js:105:135)"
  },
  "message": "Cannot read properties of undefined (reading 'symbolize')"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 00:27:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175388#M77389</guid>
      <dc:creator>Brandon-Ellis</dc:creator>
      <dc:date>2022-05-19T00:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175696#M77400</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/586592"&gt;@Brandon-Ellis&lt;/a&gt;&amp;nbsp;this is a bug for ImageryLayer with RasterStretchRenderer. :(. I created an issue for this and will let you know once it is fixed. You can perhaps just toggle the visibility between the two layers in your app? If you need to add or remove layers at runtime, then you can remove the layer and destroy it... then add a new instance of the layer as shown in this app:&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/gOvWNKe?editors=1000" target="_blank"&gt;https://codepen.io/U_B_U/pen/gOvWNKe?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 19:14:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175696#M77400</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-05-19T19:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175728#M77403</link>
      <description>&lt;P&gt;Thanks for checking into the issue and confirming that it is a bug.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We considered just toggling the visibility as a workaround, but were curious about the overhead on client machines.&amp;nbsp; Does the image FlowRenderer still compute the curvy vectors when .visible = false?&amp;nbsp; If not, toggling visibility will probably be the most efficient workaround to implement.&lt;/P&gt;&lt;P data-unlink="true"&gt;I do have another observation and question about the new implementation of FlowRenderer.&amp;nbsp; When toggling the visibility of the colored vectors, the &lt;SPAN&gt;RasterStretchRenderer layer flashes without the vector mask as if the layers within the group are turned off in a vectors first order.&amp;nbsp; This didn't happen in .22 when we started working with this ability instead of the&amp;nbsp;animatedEnvironmentLayer&amp;nbsp;library.&amp;nbsp; Can this be changed so that the raster stretch layer is turned off first in order to eliminate the flashing colors?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 20:15:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175728#M77403</guid>
      <dc:creator>Brandon-Ellis</dc:creator>
      <dc:date>2022-05-19T20:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175786#M77408</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So I talked to the developer about toggling layer visibility. We do not run tracing while the layer is invisible. So it does not load, process or render the data while invisible. So yes toggling layer visibility will be the most efficient way.&lt;/P&gt;&lt;P&gt;The flashing happens only your app. I have not spend time debugging it though. If I pull out necessary code then the layer loads without flashing.&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/ExQXxma?editors=1001" target="_blank"&gt;https://codepen.io/U_B_U/pen/ExQXxma?editors=1001&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 23:13:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175786#M77408</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-05-19T23:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175789#M77409</link>
      <description>&lt;P&gt;That's great news.&amp;nbsp; I will implement the workaround until the bug is fixed.&lt;/P&gt;&lt;P&gt;The pen you provided does not flash, but it also does not toggle the visibility of the group layer which is when the flashing occurs.&amp;nbsp; The function on line 19 in the JS toggles the visibility of the activeLayer (in this case the wind vector wind magnitude groupLayer) when the calciteIcon eye button is clicked.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/ostrya/pen/YzeVNQx?editors=1111" target="_blank"&gt;FlowRenderer layer switch test (codepen.io)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 23:27:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1175789#M77409</guid>
      <dc:creator>Brandon-Ellis</dc:creator>
      <dc:date>2022-05-19T23:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1177279#M77473</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This issue will be fixed at 4.24 (will be released late June). You can try out the fix in our &lt;EM&gt;next version( &amp;lt;script src="&lt;A href="https://js.arcgis.com/next/" target="_blank"&gt;https://js.arcgis.com/next/&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;)&lt;/EM&gt; and the fix will be available on next by Tuesday next week.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is an updated codepen app to point to next. Please note that the fix is not in there until next Tuesday.&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/eYVWwvw?editors=100" target="_blank"&gt;https://codepen.io/U_B_U/pen/eYVWwvw?editors=100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope we can mark this issue as resolved.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 17:01:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1177279#M77473</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-05-25T17:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1177503#M77484</link>
      <description>&lt;P&gt;That's great news.&amp;nbsp; Thank you for assisting with the bug and the workaround.&lt;BR /&gt;&lt;BR /&gt;Should I start a new thread for the flickering/flashing issue or are we able to continue here?&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 12:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1177503#M77484</guid>
      <dc:creator>Brandon-Ellis</dc:creator>
      <dc:date>2022-05-26T12:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1177655#M77495</link>
      <description>&lt;P&gt;We can continue here. Will update you here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 18:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1177655#M77495</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-05-26T18:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1183626#M77707</link>
      <description>&lt;P&gt;Any updates?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Also, while it is not replicated in the &lt;A href="https://codepen.io/ostrya/pen/YzeVNQx?editors=1111" target="_blank" rel="nofollow noopener noreferrer"&gt;FlowRenderer layer switch test (codepen.io)&lt;/A&gt;&amp;nbsp;codepen, when we load the global dataset the raster-stretch layer shows up without the flow layer masking it.&amp;nbsp; This is highly undesirable.&amp;nbsp; Is there a way to prevent the&amp;nbsp;raster-stretch layer layer from displaying before the flow layer has completed loading/calculating?&amp;nbsp; I suppose we could programmatically deal with these issues with custom functions for displaying the raster-stretch layer only when the flow layer is present and fully loaded, but that seems like something that should be handled internally.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 16:23:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1183626#M77707</guid>
      <dc:creator>Brandon-Ellis</dc:creator>
      <dc:date>2022-06-16T16:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problems re-adding a GroupLayer to a map after it has been removed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1204185#M78347</link>
      <description>&lt;P&gt;4.24 has resolved all of the issue that we were experiencing with FlowRenderer and its associated components.&amp;nbsp; We are preparing to move the new codebase into production.&amp;nbsp; Thank you for your assistance and a hearty 'Great Job!' to the whole team.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 14:26:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-re-adding-a-grouplayer-to-a-map-after-it/m-p/1204185#M78347</guid>
      <dc:creator>Brandon-Ellis</dc:creator>
      <dc:date>2022-08-18T14:26:55Z</dc:date>
    </item>
  </channel>
</rss>

