<?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: Is there any OOTB designed utility to change the webmap dynamically in app designed in Web AppBuilder? in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72388#M2014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sorry I don't know the answer to that question. I would think that your widget needs to listen from map changed and then &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;instantiate&lt;/SPAN&gt; itself again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2016 13:57:35 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-04-21T13:57:35Z</dc:date>
    <item>
      <title>Is there any OOTB designed utility to change the webmap dynamically in app designed in Web AppBuilder?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72385#M2011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We would like to change the webmap assigned to the app created using Web AppBuilder dynamically in a custom widget. And all other widgets such as "Search",&amp;nbsp; "Coordinate",&amp;nbsp; "OverView Map",&amp;nbsp; "SclareBar",&amp;nbsp; "HomeButton",&amp;nbsp; "ZoomSlider" will work with out any impact.&amp;nbsp; So, could anyone please direct me if there is any OOTB utility available in Web AppBuilder framework?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following the below procedure to implement this. Please let me know if there is any other best way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Destroying current map (by..... this.map.destroy();)&lt;/P&gt;&lt;P&gt;2. Creating a new map with webmap id of desired webmap, using below code&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var mapDeferred = jimuUtils.createWebMap("&amp;lt;url of portal&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, "newWebmapID",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapDivId, {});&lt;/P&gt;&lt;P&gt;3. Publishing "mapChanged" event&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topic.publish('mapChanged', newMapObject);&lt;/P&gt;&lt;P&gt;4. Subscribing this event in all the widgets such as mentioned above and writing necessary code to set map object, events, to the code esri dijits&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is working some how. But I am not sure if this is the correct way. So, I would request for any best solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vara Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 06:12:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72385#M2011</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2016-04-21T06:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any OOTB designed utility to change the webmap dynamically in app designed in Web AppBuilder?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72386#M2012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; In the MapManager.js there is a onAppConfigChanged method for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require "jimu/MapManager"
MapManager
var chgdAppConfig = this.appConfig;
chgdAppConfig .map.itemId = "your new item id";
//if you need to change the portalUrl
chgdAppConfig .map.portalUrl = "Your new portal url";
MapManager.getInstance().onAppConfigChanged (chgdAppConfig , "mapChange", {});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:48:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72386#M2012</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T22:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any OOTB designed utility to change the webmap dynamically in app designed in Web AppBuilder?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72387#M2013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Robert. It is very nice and very simple and working perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one thing that, the custom widget from where this map switching is initiated, is not getting loaded again. I am using, Plateau theme, foldable panel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once, the app is reloaded with new WebMap, blank widget panel is kept opened (in which custom widget was opened before map was changed). It did not re load the original widget. Is it expected behavior and need to write any custom code to instantiate the widget again? or is there any other way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vara Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 13:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72387#M2013</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2016-04-21T13:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any OOTB designed utility to change the webmap dynamically in app designed in Web AppBuilder?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72388#M2014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sorry I don't know the answer to that question. I would think that your widget needs to listen from map changed and then &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;instantiate&lt;/SPAN&gt; itself again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 13:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72388#M2014</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-21T13:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any OOTB designed utility to change the webmap dynamically in app designed in Web AppBuilder?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72389#M2015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert. I will give a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Vara Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 14:00:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/is-there-any-ootb-designed-utility-to-change-the/m-p/72389#M2015</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2016-04-21T14:00:58Z</dc:date>
    </item>
  </channel>
</rss>

