<?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: custom widget with layers on map in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-with-layers-on-map/m-p/1675316#M22056</link>
    <description>&lt;P&gt;Yes. This is now possible in ArcGIS Experience Builder.&lt;/P&gt;&lt;P&gt;Custom widgets can now discover and react to layers at runtime, including layers users add dynamically.&lt;/P&gt;&lt;P&gt;You are no longer forced to bind widgets only to design-time layers.&lt;/P&gt;&lt;P&gt;How it works&lt;BR /&gt;In a custom widget (React + ArcGIS JS API), you can access the active map view and enumerate layers exactly like you’re doing:&lt;/P&gt;&lt;P&gt;const view = jimuMapView?.view;&lt;/P&gt;&lt;P&gt;view.map.layers.forEach((lyr) =&amp;gt; {&lt;BR /&gt;// Works for layers added at runtime&lt;BR /&gt;console.log(lyr.title, lyr.type);&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can also:&lt;/P&gt;&lt;P&gt;Watch for layers being added/removed&lt;/P&gt;&lt;P&gt;Filter by layer type (FeatureLayer, GroupLayer, etc.)&lt;/P&gt;&lt;P&gt;Operate on all current layers without prior configuration&lt;/P&gt;&lt;P&gt;Key caveat&lt;/P&gt;&lt;P&gt;You still need map access via JimuMapView, but layer selection no longer has to be fixed at design time unless you want UI-driven configuration.&lt;/P&gt;&lt;P&gt;Bottom line&lt;BR /&gt;Experience Builder has matured:&lt;/P&gt;&lt;P&gt;Runtime layer discovery — supported&lt;/P&gt;&lt;P&gt;Dynamic user-loaded layers — supported&lt;/P&gt;&lt;P&gt;Hard design-time coupling — no longer required&lt;/P&gt;</description>
    <pubDate>Tue, 30 Dec 2025 17:40:14 GMT</pubDate>
    <dc:creator>VenkataKondepati</dc:creator>
    <dc:date>2025-12-30T17:40:14Z</dc:date>
    <item>
      <title>custom widget with layers on map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-with-layers-on-map/m-p/1675310#M22055</link>
      <description>&lt;P&gt;One reason I was hesitant to adopt Experience Builder was its limited support for custom widgets that can work dynamically with whatever layers are currently on the map. The last time I evaluated it, a widget had to be configured at design time with specific layers, meaning you needed to know in advance which layers it would interact with.&lt;/P&gt;&lt;P&gt;In the applications I work on, users can load any layers into the map at runtime and then use a custom widget to operate on some or all of those layers.&lt;/P&gt;&lt;P&gt;So my question is: is this now possible in Experience Builder?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I just use this to detect the layers during runtime&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;arcgisMap.view.map.layers.map(async function (lyr) {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2025 17:40:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-with-layers-on-map/m-p/1675310#M22055</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2025-12-30T17:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: custom widget with layers on map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-with-layers-on-map/m-p/1675316#M22056</link>
      <description>&lt;P&gt;Yes. This is now possible in ArcGIS Experience Builder.&lt;/P&gt;&lt;P&gt;Custom widgets can now discover and react to layers at runtime, including layers users add dynamically.&lt;/P&gt;&lt;P&gt;You are no longer forced to bind widgets only to design-time layers.&lt;/P&gt;&lt;P&gt;How it works&lt;BR /&gt;In a custom widget (React + ArcGIS JS API), you can access the active map view and enumerate layers exactly like you’re doing:&lt;/P&gt;&lt;P&gt;const view = jimuMapView?.view;&lt;/P&gt;&lt;P&gt;view.map.layers.forEach((lyr) =&amp;gt; {&lt;BR /&gt;// Works for layers added at runtime&lt;BR /&gt;console.log(lyr.title, lyr.type);&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can also:&lt;/P&gt;&lt;P&gt;Watch for layers being added/removed&lt;/P&gt;&lt;P&gt;Filter by layer type (FeatureLayer, GroupLayer, etc.)&lt;/P&gt;&lt;P&gt;Operate on all current layers without prior configuration&lt;/P&gt;&lt;P&gt;Key caveat&lt;/P&gt;&lt;P&gt;You still need map access via JimuMapView, but layer selection no longer has to be fixed at design time unless you want UI-driven configuration.&lt;/P&gt;&lt;P&gt;Bottom line&lt;BR /&gt;Experience Builder has matured:&lt;/P&gt;&lt;P&gt;Runtime layer discovery — supported&lt;/P&gt;&lt;P&gt;Dynamic user-loaded layers — supported&lt;/P&gt;&lt;P&gt;Hard design-time coupling — no longer required&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2025 17:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-with-layers-on-map/m-p/1675316#M22056</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2025-12-30T17:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: custom widget with layers on map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-with-layers-on-map/m-p/1675327#M22057</link>
      <description>&lt;P&gt;Thank you. I wasn’t aware of this, as it has been a while since I last reviewed ExB. It would be beneficial for application developers—especially those who are not familiar with React—to have a design-time option that allows layers to be added to the map at runtime.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2025 18:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-with-layers-on-map/m-p/1675327#M22057</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2025-12-30T18:18:18Z</dc:date>
    </item>
  </channel>
</rss>

