<?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: Replace web map in widget code? in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772207#M1747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a widget, but has dependencies on another widget (that I call Acme).&amp;nbsp; Acme is like a traffic cop.&amp;nbsp; It starts several widgets, and modifies the behavior/appearance of several Esri widgets.&amp;nbsp; Here's a link to what little documentation I have written so far:&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;&lt;A class="jive-link-external-small" href="ftp://ftp.hamiltoncounty.in.gov/GIS/AWAB/2015-02-10_DOCS.zip" rel="nofollow" target="_blank"&gt;ftp://ftp.hamiltoncounty.in.gov/GIS/AWAB/2015-02-10_DOCS.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm about finished with mods to Esri's Bookmark and Draw widget.&amp;nbsp; I'm chasing some Safari issues now, and hope to add to the documentation soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for adding me to your resource list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The documentation is now part of the Web AppBuilder Application you can download from here: &lt;A href="https://community.esri.com/message/490900"&gt;Larrys Custom WAB Widgets and More&lt;/A&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/490900#490900"&gt; &lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Larry&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Feb 2015 22:27:18 GMT</pubDate>
    <dc:creator>LarryStout</dc:creator>
    <dc:date>2015-02-23T22:27:18Z</dc:date>
    <item>
      <title>Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772200#M1740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you write code in a widget to replace an app's web map?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attempted to use &lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.arcgis.utils-amd.html"&gt;esri/arcgis/utils&lt;/A&gt; like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;arcgisUtils.createMap(myWebMapId, this.map.id).then(lang.hitch(function(response) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map = response.map;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code did not visibly change the map control. Then I had an idea to clear the contents of the map div before loading the map:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;var mapDiv = dom.byId(this.map.id);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mapDiv.innerHTML = "";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;arcgisUtils.createMap(myWebMapId, this.map.id).then(lang.hitch(function(response) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map = response.map;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, the map control did load and display my web map! However, all of the app's widgets disappeared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I replace the map contents without removing the app's widgets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 19:26:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772200#M1740</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-10-30T19:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772201#M1741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a similar situation ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as we would like to use the WAB for our viewer and port our custom components over and use out of the box where possible ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our Canterbury Maps Portal =&amp;gt;&amp;nbsp; &lt;A href="http://canterburymaps.govt.nz/" title="http://canterburymaps.govt.nz/"&gt;Home&lt;/A&gt;&lt;/P&gt;&lt;P&gt;JS Viewer =&amp;gt; &lt;A href="http://canterburymaps.govt.nz/Viewer/" title="http://canterburymaps.govt.nz/Viewer/"&gt;Canterbury Maps&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can re-load a map view via the startup phase and pre-load ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you just need to capture the map object as it available in the startup phase ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;startup: function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.inherited(arguments);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('startup');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('map object',this.map);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.initMapsGallery();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _map = this.map;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;function cmap(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var deferred;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred = arcgisUtils.createMap(webMapItemID, "map");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred.then(function (response) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this.map = response.map;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(_map);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _map.destroy();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _map = response.map;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('map is changed - yah!');&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only problem is the widgets gets disconnected ... and so you have to iterate through them to re-start ... [ which I am trying to figure out with limit docos from esri ...]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if this fails ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;other approach is to do this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;window.open('?' + window.location.hash + '&amp;amp;webmap=0c4c5d8e982c4704b22da9de51cd1ba3', '_self');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here below is some debug code trying to figure out how to load widgets etc ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var wm = WidgetManager.getInstance();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('widget manager', wm);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(wm.getWidgetsByName("Scalebar"));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _widget = wm.getWidgetsByName("Scalebar");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _widget1 = wm.getWidgetById("widgets/LayerList/Widget_16");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(_widget1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _widget[0].destroy();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //_widget1.destroy();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 'widgets/Scalebar/Widget'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _j = {'uri': 'widgets/Scalebar/Widget','position': {'left': 25,'bottom': 25}};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _j1 = { "label": "LayerList","uri": "widgets/LayerList/Widget"};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _deferred = wm.loadWidget(_j);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _deferred1 = wm.loadWidget(_j1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _deferred.then(function(_r){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wm.openWidget(_r);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; })&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _deferred1.then(function(_r){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('_r', _r);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wm.openWidget(_r);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wm.maximizeWidget(_r);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wm.normalizeWidget('LayerList');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; })&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(wm.getAllWidgets());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;coomsie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 21:10:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772201#M1741</guid>
      <dc:creator>IainCampion</dc:creator>
      <dc:date>2015-01-08T21:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772202#M1742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been running into the same problem. I'm trying to write a custom widget that allows the user to change the app's webmap by selecting from their account's layers or searching ArcGISOnline. First I wasn't able to use map.destroy because it just wouldn't work and then new maps would be created under it. Instead I had to use dojo to find and destroy all of the map_root divs before adding a new map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It mostly works but I had to do some elaborate things to get the widgets to accept the new map. For some widgets it was fairly simple, I just needed to use their setMap method. But other widgets had more complicated details. For the basemap gallery I had to use dijit.byId(dojo.query('.jimu-widget-basemapgallery')[0].id).basemapGallery.map=map instead of just setMap(map). For the draw tool I had to use dijit.byId(dojo.query('.jimu-widget-draw')[0].id).drawBox.setMap(map). The layer list was a pain to update, too. Now everything works except the Home Button, My Location, and Geocoder. For some reason setting them to the new map does nothing and I can't find anywhere else to change them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point it might be easier just to destroy and re-create the widgets but I was having problems with that as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did manage to make a custom widget that lets the app user browse their map layers and search AGOL and then add those layers to the map and that worked perfectly fine. It's just destroying and re-creating the map that screws stuff up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 01:12:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772202#M1742</guid>
      <dc:creator>JoeO_Brien</dc:creator>
      <dc:date>2015-02-19T01:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772203#M1743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think this is exactly what anyone has requested, but the technique may be useful.&amp;nbsp; I needed to "intercept" the WebMap and remove any layers that were secured or that were unreachable before loading the web map.&amp;nbsp; I added a reference in index.html to a new JavaScript file, modifyWebMap.js.&amp;nbsp; That's where all of the magic happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file is 375 lines, so I've attached a link to it rather than copying the code into this reply:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;A class="jive-link-external-small" href="ftp://ftp.hamiltoncounty.in.gov/GIS/AWAB/modifyWebMap%202015-02-20.zip" rel="nofollow" target="_blank"&gt;ftp://ftp.hamiltoncounty.in.gov/GIS/AWAB/modifyWebMap%202015-02-20.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I've updated the files I use for this.&amp;nbsp; There is now a preProcess.js called by index.html.&amp;nbsp; preProcess.js calls validateWebMap.js (and probably other files in the future).&amp;nbsp; These are part of the Web AppBuilder Application you can download from here: &lt;A href="https://community.esri.com/message/490900"&gt;Larrys Custom WAB Widgets and More&lt;/A&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/490900#490900"&gt; &lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Larry&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 15:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772203#M1743</guid>
      <dc:creator>LarryStout</dc:creator>
      <dc:date>2015-02-20T15:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772204#M1744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s. like some of your other widgets ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are you wiling to share .. maybe via github.com so others can contribute.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2015 20:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772204#M1744</guid>
      <dc:creator>IainCampion</dc:creator>
      <dc:date>2015-02-22T20:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772205#M1745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's my goal.&amp;nbsp; I'm not very good with GitHub yet, but I plan to change that soon.&amp;nbsp; In the meantime, You can have anything you want.&amp;nbsp; Just send me an email using the feedback link on &lt;A href="http://gis.hamiltoncounty.in.gov/mapviewer/index.html"&gt;http://gis.hamiltoncounty.in.gov/mapviewer/index.html&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 03:15:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772205#M1745</guid>
      <dc:creator>LarryStout</dc:creator>
      <dc:date>2015-02-23T03:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772206#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Larry, I like your custom-tabbed splash screen.&amp;nbsp; Is that in widget or a sharable format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW - I'm updating my &lt;A href="https://community.esri.com/migration-blogpost/2580"&gt;Web AppBuilder Developer Edition – Customization Resource List&lt;/A&gt;‌ and added a link to your sample page.&amp;nbsp; just fyi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 22:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772206#M1746</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-02-23T22:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772207#M1747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a widget, but has dependencies on another widget (that I call Acme).&amp;nbsp; Acme is like a traffic cop.&amp;nbsp; It starts several widgets, and modifies the behavior/appearance of several Esri widgets.&amp;nbsp; Here's a link to what little documentation I have written so far:&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;&lt;A class="jive-link-external-small" href="ftp://ftp.hamiltoncounty.in.gov/GIS/AWAB/2015-02-10_DOCS.zip" rel="nofollow" target="_blank"&gt;ftp://ftp.hamiltoncounty.in.gov/GIS/AWAB/2015-02-10_DOCS.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm about finished with mods to Esri's Bookmark and Draw widget.&amp;nbsp; I'm chasing some Safari issues now, and hope to add to the documentation soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for adding me to your resource list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The documentation is now part of the Web AppBuilder Application you can download from here: &lt;A href="https://community.esri.com/message/490900"&gt;Larrys Custom WAB Widgets and More&lt;/A&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/490900#490900"&gt; &lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Larry&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 22:27:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772207#M1747</guid>
      <dc:creator>LarryStout</dc:creator>
      <dc:date>2015-02-23T22:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772208#M1748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Larry,&lt;/P&gt;&lt;P&gt;I added a link to your zipped doc link shown above.&amp;nbsp; Looks like there are a lot of good tips in there (although I haven't read it all yet.).&amp;nbsp; If you prefer for me not to link to it yet, let me know.&amp;nbsp; If/when you post all in a discussion or blog, I'll link to that.&lt;/P&gt;&lt;P&gt;Thanks for sharing....and I hope your will be able to share your code view github or geonet!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 22:45:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772208#M1748</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-02-23T22:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772209#M1749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Larry. I'll take a look at that. It could be very useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 18:46:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772209#M1749</guid>
      <dc:creator>JoeO_Brien</dc:creator>
      <dc:date>2015-02-24T18:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772210#M1750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To avoid having to reset all the widget references manually what you could do instead is post an update to portal with your webmap json with additional layers using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var portal = portalUtils.getPortal(this.appConfig.portalUrl);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; portal.getUser().then(lang.hitch(this, function (user) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user.updateItem(this.map.itemId, argsUpdate).then(lang.hitch(this, function (updateItem) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if want to reload with what just pushed to portal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topic.publish('appConfigChanged', this.appConfig, 'mapChange'); //this will trigger map update which will refresh page and hence all the widgets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;}));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done something similar and sniffed out the structure of the json for webmap in fiddler. I then just update the json object with my changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to make a brand new web map, I would suggest add an item and then update appConfig and call the change event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;user.addItem(args, '').then(lang.hitch(this, function (newItem) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (newItem.success) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var itemId = newItem.id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="line-height: 1.5;"&gt;this.appConfig.map.itemId = itemId;&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; topic.publish('appConfigChanged', this.appConfig, 'mapChange'); //this will trigger map update which will refresh page and hence all the widgets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt; }));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is a page refresh but you no long have to deal with destroying, recreating dom as well as updating all the widget references to webmap&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 18:17:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772210#M1750</guid>
      <dc:creator>MelindaFrost</dc:creator>
      <dc:date>2015-02-25T18:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772211#M1751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spent some time looking through the jimu.js folder specifically at the MapManager, LayoutManager and the WidgetManager to see how Esri manages with map and widget lifecycle. From this I have found the following solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user clicks on a button to load a new web map the following happens:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;//The widget broadcasts a message that the map is about to be destroyed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; topic.publish('beforeMapDestory', this.map);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The map is destroyed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; this.map.destroy();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //A new deffered object is created to handle the creation of a new webmap&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; var mapDeferred = jimuUtils.createWebMap(portalUrl, webMapItemId, mapContainerId, webMapOptions);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The deffered is executed ensuring that the response is executed with "this" being the widget.js file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; mapDeferred.then(lang.hitch(this, this._processNewMapSuccess), lang.hitch(this, this._processNewMapFail));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the web map creation is complete the following function is executed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;//I set up the returned web map as a map object&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; var map = response.map;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; map.itemId = this.appConfig.map.itemId;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; map.itemInfo = response.itemInfo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; map.webMapResponse = response;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; // enable snapping&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; var options = {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; snapKey: keys.copyKey&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; };&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; map.enableSnapping(options);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The widget gets a handle on the appConfig&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; var appConfig = this.appConfig&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The widget gets the configuration for the widget of interest&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //This would need to be made dynamic but for testing I&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //just simply grabbed the widget by its position in the array&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; var mapSwitcherWidgetConfig = appConfig.widgetPool.widgets[9]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The widget changes the openAtStart propertie to true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; mapSwitcherWidgetConfig.openAtStart = true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The map is set as the applications map property&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; this.map = map;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The widget broadcasts a message that the map has been changed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; //The app builder handles all the magic from here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; topic.publish('mapChanged', this.map);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I haven't included in the code above is that you can change the intial map extent in the appConfig so that when the new web map loads its displayed at the extent that the user was previously viewing at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 21:06:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772211#M1751</guid>
      <dc:creator>SamDrummond2</dc:creator>
      <dc:date>2015-03-17T21:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772212#M1752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I know which .js file to change i.e what is the name of the .js file in which I am supposed to make these changes in the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 19:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772212#M1752</guid>
      <dc:creator>NikhilSharma</dc:creator>
      <dc:date>2015-04-16T19:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Replace web map in widget code?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772213#M1753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to implement this code...partially. When I first open my map, I can click my drop down and choose the web map that I want to see and that works...once. But each time I try again, it will not&amp;nbsp; change the web map. Chrome Dev tools show that the widgets are destroyed and that the "map changed" and then the widgets get recreated, but the map never changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone else experienced this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 19:13:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/replace-web-map-in-widget-code/m-p/772213#M1753</guid>
      <dc:creator>EricMcPhee</dc:creator>
      <dc:date>2015-08-06T19:13:36Z</dc:date>
    </item>
  </channel>
</rss>

