<?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 Customize Legend Widget to Change Order of Feature Layers on Base Map with Click Event in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/customize-legend-widget-to-change-order-of-feature/m-p/1300384#M7278</link>
    <description>&lt;P&gt;Hello all!&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm in a bit of pickle. I'm creating a custom legend widget which will list the feature layers on a map. I'd like to be able to create a button or something on the legend itself to shift/unshift the order of the feature layers as they are displayed on the map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made the legend widget&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/widgets/js-api-widget" target="_self"&gt;from a clone of this widget repo on github&lt;/A&gt;&amp;nbsp;but there doesn't seem to be a whole lot I can do to customize it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-06-16 at 3.38.06 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73519i01AD6DD0850DC42F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-06-16 at 3.38.06 PM.png" alt="Screen Shot 2023-06-16 at 3.38.06 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Consider this screenshot of what I have so far. Ideally what I'd like to do is make a button (or any type of click-event mechanism really, i'm not picky) to change the order at which the layers are stacked on the base map. In the screenshot it's layered top-to-bottom as 1, 2, 3, but I'd love to be able to change the order to 2,1,3 or 1, 3, 2 or 3,2,1 or whatever AFTER the initialization of the feature layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone think they can help me out with this? I'm working with ArcGIS Experience Builder and building the custom legend widget with TypeScript and React.js. I'm still kinda new-ish to ArcGIS Experience Builder Widgets so any help is super appreciated. Thanks y'all&lt;/P&gt;</description>
    <pubDate>Fri, 16 Jun 2023 19:59:20 GMT</pubDate>
    <dc:creator>craragon77</dc:creator>
    <dc:date>2023-06-16T19:59:20Z</dc:date>
    <item>
      <title>Customize Legend Widget to Change Order of Feature Layers on Base Map with Click Event</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/customize-legend-widget-to-change-order-of-feature/m-p/1300384#M7278</link>
      <description>&lt;P&gt;Hello all!&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm in a bit of pickle. I'm creating a custom legend widget which will list the feature layers on a map. I'd like to be able to create a button or something on the legend itself to shift/unshift the order of the feature layers as they are displayed on the map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made the legend widget&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/widgets/js-api-widget" target="_self"&gt;from a clone of this widget repo on github&lt;/A&gt;&amp;nbsp;but there doesn't seem to be a whole lot I can do to customize it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-06-16 at 3.38.06 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73519i01AD6DD0850DC42F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-06-16 at 3.38.06 PM.png" alt="Screen Shot 2023-06-16 at 3.38.06 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Consider this screenshot of what I have so far. Ideally what I'd like to do is make a button (or any type of click-event mechanism really, i'm not picky) to change the order at which the layers are stacked on the base map. In the screenshot it's layered top-to-bottom as 1, 2, 3, but I'd love to be able to change the order to 2,1,3 or 1, 3, 2 or 3,2,1 or whatever AFTER the initialization of the feature layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone think they can help me out with this? I'm working with ArcGIS Experience Builder and building the custom legend widget with TypeScript and React.js. I'm still kinda new-ish to ArcGIS Experience Builder Widgets so any help is super appreciated. Thanks y'all&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 19:59:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/customize-legend-widget-to-change-order-of-feature/m-p/1300384#M7278</guid>
      <dc:creator>craragon77</dc:creator>
      <dc:date>2023-06-16T19:59:20Z</dc:date>
    </item>
  </channel>
</rss>

