<?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: ChangeWebMap Widget in Experience Builder Custom Widgets</title>
    <link>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1598134#M512</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply and that does look promising for dynamically populating a list of maps from a group.&amp;nbsp; Still working on where the loaded map would be changed and how to refresh.&lt;/P&gt;&lt;P&gt;We can generate a URL with the application and webmap IDs and use it as a link in the Item Selector cards, but I really would like to do that within the widget to hide the ID information.&amp;nbsp; The URLs are not pretty:&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.gis.com/viewer/portal/apps/experiencebuilder/experience/?id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;webmap=1cf42d227f4d34a08cacfed55918f966" target="_blank" rel="noopener"&gt;https://my.gis.com/portal/apps/experiencebuilder/experience/?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.gis.com/viewer/portal/apps/experiencebuilder/experience/?id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;webmap=1cf42d227f4d34a08cacfed55918f966" target="_blank" rel="noopener"&gt;id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.gis.com/viewer/portal/apps/experiencebuilder/experience/?id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;webmap=1cf42d227f4d34a08cacfed55918f966" target="_blank" rel="noopener"&gt;webmap=1cf42d227f4d34a08cacfed55918f966&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The first part of the URL can be cleaned up using a proxy but the rest would need to added in the request header by the widget.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Mar 2025 17:58:46 GMT</pubDate>
    <dc:creator>LanceCole</dc:creator>
    <dc:date>2025-03-21T17:58:46Z</dc:date>
    <item>
      <title>ChangeWebMap Widget</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1598058#M510</link>
      <description>&lt;P&gt;I am looking for some direction on creating a custom widget in Experience Builder.&amp;nbsp; I have worked with Application Builder for years but never ventured into the ExB arena.&amp;nbsp; &amp;nbsp;About 6-7 years ago I created a Load Map widget based on the City of Garland, Texas &lt;A href="https://community.esri.com/t5/web-appbuilder-custom-widgets-documents/changewebmap-widget/ta-p/906383" target="_self"&gt;ChangeWebMap&lt;/A&gt; Widget.&amp;nbsp; I have kept the widget updated; however, now must move on to ExB to continue its use.&lt;/P&gt;&lt;P&gt;I believe I can start with:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;ESRI List or Fixed Panel widget&lt;/LI&gt;&lt;LI&gt;Add code to query the enterprise portal for a list of Maps, map IDs, name, etc. from a particular group&lt;/LI&gt;&lt;LI&gt;Use the data to dynamically populate the list or add cards to the fixed panel&lt;/LI&gt;&lt;LI&gt;Add code to change the application/Map webmap ID and refresh on click of a list item or card&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I am able to accomplish this using the application ID and webmap ID as URL parameters but I am struggling find how to programmatically achieve this in ExB.&lt;/P&gt;&lt;P&gt;Can anyone point me to where in ExB and/or examples to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;query a portal for the maps in a designated group&lt;/LI&gt;&lt;LI&gt;dynamical add items to a list or fixed panel&lt;/LI&gt;&lt;LI&gt;change or set the wedmap ID on on the app and refresh&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If we only had a few maps they could just be added to the app map references and toggle them from the application using available widgets.&amp;nbsp; However, we currently have 10-15 maps we want to have available and this number is going increase.&amp;nbsp; We also have periodic maps that need to be quickly added and removed.&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp; I feel as though I am facing a vertical learning curve at the moment as ExB custom widgets are a totally different beast.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 15:43:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1598058#M510</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2025-03-21T15:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: ChangeWebMap Widget</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1598063#M511</link>
      <description>&lt;P&gt;&lt;A href="https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-basic-item-selector-itemselector--docs" target="_blank"&gt;https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-basic-item-selector-itemselector--docs&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The Item Selector in the Storybook might get you most of the way done.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 15:48:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1598063#M511</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2025-03-21T15:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: ChangeWebMap Widget</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1598134#M512</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply and that does look promising for dynamically populating a list of maps from a group.&amp;nbsp; Still working on where the loaded map would be changed and how to refresh.&lt;/P&gt;&lt;P&gt;We can generate a URL with the application and webmap IDs and use it as a link in the Item Selector cards, but I really would like to do that within the widget to hide the ID information.&amp;nbsp; The URLs are not pretty:&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.gis.com/viewer/portal/apps/experiencebuilder/experience/?id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;webmap=1cf42d227f4d34a08cacfed55918f966" target="_blank" rel="noopener"&gt;https://my.gis.com/portal/apps/experiencebuilder/experience/?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.gis.com/viewer/portal/apps/experiencebuilder/experience/?id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;webmap=1cf42d227f4d34a08cacfed55918f966" target="_blank" rel="noopener"&gt;id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.gis.com/viewer/portal/apps/experiencebuilder/experience/?id=fc4f1eb6a36342c9b0264a02109024a7&amp;amp;webmap=1cf42d227f4d34a08cacfed55918f966" target="_blank" rel="noopener"&gt;webmap=1cf42d227f4d34a08cacfed55918f966&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The first part of the URL can be cleaned up using a proxy but the rest would need to added in the request header by the widget.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 17:58:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1598134#M512</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2025-03-21T17:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: ChangeWebMap Widget</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1599374#M518</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/201429"&gt;@LanceCole&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I've been thinking about this a bit too. In our current WAB solution we have different applications for the different web maps and I created a simple widget to switch between them and keep the current map scope. In our upcoming ExB solution I would prefer to have just one application to maintain and be able to switch web maps, but I've just started looking at the dev edition and have no idea yet.&lt;/P&gt;&lt;P&gt;But I've worked a bit with OOTB ExB and one of the big differences is that you can have multiple web maps and you have to configure which map to use in map centric widgets. I'm afraid this could be a problem, and all map centric widgets break when you change the web map. Do you have any experience with this so far?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 11:13:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1599374#M518</guid>
      <dc:creator>MattiasEkström</dc:creator>
      <dc:date>2025-03-26T11:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: ChangeWebMap Widget</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1599431#M519</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am also trying for similar requirement. I tried below approach and could able to create a new instance for JimuMapView with new web map id. However, the new instance is not sent to all widgets and app. I am unable to identify how can we do this. I used 'getAppStore().dispatch(appActions.jimuMapViewUpdated' but it did not work. Any guidance would be very much helpful.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const createNewJimuMapView = async (jimuMapView) =&amp;gt; { 
  const dataSourceManager = DataSourceManager.getInstance();
  const dSources = dataSourceManager.getDataSourcesAsArray()

  const dsOptions = { 
    id:  "ds_11e0c122b7c745d4ae1385ae907733b0",
    itemId: "11e0c122b7c745d4ae1385ae907733b0",
    portalUrl: "&amp;lt;Portal Url&amp;gt;",
    sourceLabel: "test",
    type: "WEB_MAP"
  }

  const ds = await dataSourceManager.createDataSource(dsOptions)

  //jimuMapView.destroy() //tried destroying, it destroyed existing

  const sourceMap = new WebMap({
    portalItem: {
      id: '11e0c122b7c745d4ae1385ae907733b0'
    }
  });

  await sourceMap.load();
  const mapView = new MapView({
    map: sourceMap
  })

  let options = {} as JimuMapViewConstructorOptions
  options['mapWidgetId'] = jimuMapView.mapWidgetId
  options['isActive'] = true
  options['dataSourceId'] = ds.id
  options['mapViewManager'] = MapViewManager.getInstance()
  options['view'] = mapView
  options['isEnablePopup'] = true

  let newJimuMapView = await MapViewManager.getInstance().createJimuMapView(options)
  const newJimuMapViewInfo: JimuMapViewInfo = {
    dataSourceId: ds.id,
    id: newJimuMapView.id,
    isActive: true,
    mapWidgetId: newJimuMapView.mapWidgetId,
    status: JimuMapViewStatus.Loaded
  }
  getAppStore().dispatch(appActions.jimuMapViewUpdated(newJimuMapView.id, newJimuMapViewInfo as IMJimuMapViewInfo))
  return newJimuMapView;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 13:52:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1599431#M519</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2025-03-26T13:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: ChangeWebMap Widget</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1600703#M528</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;, Could you please throw some light on this. How can I make my code work?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Mar 2025 17:39:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/changewebmap-widget/m-p/1600703#M528</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2025-03-30T17:39:51Z</dc:date>
    </item>
  </channel>
</rss>

