Hello,
is it possible to swap the webmap used in my WAB app for a new map at the click of a button?
The original webmap is set in the config of the app. I am trying to swap the webmap for a new one like so (following this sample code Web map by ID | ArcGIS API for JavaScript 3.30 😞
arcgisUtils<SPAN class="punctuation token">.</SPAN><SPAN class="token function">createMap</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"ckdklsdjksd98sdjxxxXX89"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"map"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">then</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>response<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>map <SPAN class="operator token">=</SPAN> response<SPAN class="punctuation token">.</SPAN>map<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>