<?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: JavaScript exception while using renderer on sublayers in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250808#M80033</link>
    <description>&lt;P&gt;It would help to have a working app to debug. Are you getting any useful errors in the console? Did you verify that the MapServer supports dynamic layers from REST? E.g.&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-01-24 at 9.12.20 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61056iC5E476BFACB44A44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2023-01-24 at 9.12.20 AM.png" alt="Screen Shot 2023-01-24 at 9.12.20 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 15:12:50 GMT</pubDate>
    <dc:creator>Noah-Sager</dc:creator>
    <dc:date>2023-01-24T15:12:50Z</dc:date>
    <item>
      <title>JavaScript exception while using renderer on sublayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250365#M80006</link>
      <description>&lt;P&gt;Hi guys, I hope you are all doing well!&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;I have a strange exception in my implementation. The problem is when there is a popup in display, and if I want to zoom out, the Esri Library is throwing an exception.&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;4.24:2411 Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;I'm not sure if it is related to my implementation. If required I can also share what I'm doing within JS.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UgurcanErkal_0-1674482485719.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60959i8BA7934756767C45/image-size/large?v=v2&amp;amp;px=999" role="button" title="UgurcanErkal_0-1674482485719.png" alt="UgurcanErkal_0-1674482485719.png" /&gt;&lt;/span&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Attaching this as well, maybe it helps.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UgurcanErkal_1-1674482730542.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60960i764F5FB30D255932/image-size/large?v=v2&amp;amp;px=999" role="button" title="UgurcanErkal_1-1674482730542.png" alt="UgurcanErkal_1-1674482730542.png" /&gt;&lt;/span&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;UPDATE:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I found the problem source. It is the renderer that I have for my sublayers. When I remove them I'm no longer having the exception but I don't understand what is wrong with my renderer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let rluLayer = new MapImageLayer({
                url: URL,
                imageFormat: "png24",
                imageTransparency: "true",
                listMode: "show",
                title: "RLU Program",
                sublayers: [
                    {
                        id: 0,
                        title: "Unavailable RLU",
                        definitionExpression: "Status = 'Available'",
                        visible: true,
                        // renderer: {
                        //     type: "simple",
                        //     symbol: {
                        //         type: "simple-fill",
                        //         style: "solid",
                        //         outline: {
                        //             style: "solid",
                        //             color: [255, 0, 0],
                        //             width: 1
                        //         },
                        //         color: [255, 0, 0, 0.2]
                        //     }
                        // }
                    },
                    {
                        id: 1,
                        title: "Available RLU",
                        definitionExpression: "HuntingID IN (810004, 810005)",
                        // renderer: {
                        //     type: "simple",
                        //     symbol: {
                        //         type: "simple-fill",
                        //         style: "solid",
                        //         outline: {
                        //             style: "solid",
                        //             color: [76, 230, 0],
                        //             width: 1
                        //         },
                        //         color: [76, 230, 0, 0.2]
                        //     }
                        // },
                        visible: true
                    }
                ]
            });

let permitLayer = new MapImageLayer({
                url: URL,
                imageFormat: "png24",
                imageTransparency: "true",
                listMode: "show",
                title: "Permit Program",
                sublayers: [
                    {
                        id: 2,
                        title: "Access Point",
                        visible: true
                    },
                    {
                        id: 3,
                        title: "Permit Area",
                        // renderer: {
                        //     type: "simple",
                        //     symbol: {
                        //         type: "simple-fill",
                        //         style: "solid",
                        //         outline: {
                        //             style: "solid",
                        //             color: [255, 186, 0],
                        //             width: 1
                        //         },
                        //         color: [255, 186, 0, 0.2]
                        //     }
                        // },
                        visible: true
                    },
                    {
                        id: 4,
                        title: "Access Route",
                        visible: true
                    },
                    {
                        id: 5,
                        title: "Walk-in Area",
                        visible: true
                    }
                ]
            });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 15:26:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250365#M80006</guid>
      <dc:creator>UgurcanErkal</dc:creator>
      <dc:date>2023-01-23T15:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript exception while using renderer on sublayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250466#M80010</link>
      <description>&lt;P&gt;Your code does work on this &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-mapimagelayer-sublayers" target="_blank"&gt;sample&lt;/A&gt;. Have you checked whether your layers support dynamic layers?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;console.log(layer.capabilities.exportMap.supportsDynamicLayers);&lt;/LI-CODE&gt;&lt;P&gt;You'll have to put this in the layer.when() function to ensure the layer is ready before you can see this property.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 17:55:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250466#M80010</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-01-23T17:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript exception while using renderer on sublayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250623#M80014</link>
      <description>&lt;P&gt;Hi Ken, no, I didn't check that. But it looks like they does.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;gt; rluLayer.capabilities.exportMap.supportsDynamicLayers
&amp;lt; true
&amp;gt; permitLayer.capabilities.exportMap.supportsDynamicLayers
&amp;lt; true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 23:10:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250623#M80014</guid>
      <dc:creator>UgurcanErkal</dc:creator>
      <dc:date>2023-01-23T23:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript exception while using renderer on sublayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250808#M80033</link>
      <description>&lt;P&gt;It would help to have a working app to debug. Are you getting any useful errors in the console? Did you verify that the MapServer supports dynamic layers from REST? E.g.&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-01-24 at 9.12.20 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61056iC5E476BFACB44A44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2023-01-24 at 9.12.20 AM.png" alt="Screen Shot 2023-01-24 at 9.12.20 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 15:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1250808#M80033</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2023-01-24T15:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript exception while using renderer on sublayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1251217#M80046</link>
      <description>&lt;P&gt;Hi Noah,&lt;/P&gt;&lt;P&gt;Yes, the MapServer supports dynamic layers. POT:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UgurcanErkal_0-1674649611365.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61169i6952FCD27D6ACFDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UgurcanErkal_0-1674649611365.png" alt="UgurcanErkal_0-1674649611365.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for the error message, I attached it to the original post. I only see a Javascript exception but not an indicator of the cause.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 12:28:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-exception-while-using-renderer-on/m-p/1251217#M80046</guid>
      <dc:creator>UgurcanErkal</dc:creator>
      <dc:date>2023-01-25T12:28:09Z</dc:date>
    </item>
  </channel>
</rss>

