<?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: How to remove the 2d map from the dom in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680031#M63368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;view.container = null&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;should have been enough, but there is a bug with it. &amp;nbsp;We will look at fixing that for next version (4.4).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 00:10:45 GMT</pubDate>
    <dc:creator>BjornSvensson</dc:creator>
    <dc:date>2017-04-06T00:10:45Z</dc:date>
    <item>
      <title>How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680023#M63360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the way our UI works the map can be opened or closed depending on what the user is doing, when i remove the map from the dom it seems to still be holding on to memory, it just keeps going up and up until the browser becomes unresponsive. is there a better way to do this? this is my current code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; this.$mainDiv.find(".arc-div").remove();&lt;BR /&gt; this.ArcView.map = null;&lt;BR /&gt; this.ArcMap.removeAll();&lt;BR /&gt; this.ArcMap = null;&lt;BR /&gt; this.ArcView = null;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it seems like the tiles are still in memory they get orphaned so it never gets cleaned up. any help would be awesome! thanks!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 19:27:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680023#M63360</guid>
      <dc:creator>AndreaWeeg</dc:creator>
      <dc:date>2017-03-22T19:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680024#M63361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrea,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You should call the destroy method on the map them remove it from the dom:&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#destroy" title="https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#destroy"&gt;https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#destroy&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 19:35:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680024#M63361</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-03-22T19:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680025#M63362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that but it throws an error (just says script error), this is what I changed it to (using js 4.2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.ArcMap.destroy(); //errors when using this &lt;/P&gt;&lt;P&gt;this.ArcView.destroy(); //this works but map is still in the memory heap (using chrome's memory profiler) and tiles seem to still be there&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 13:29:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680025#M63362</guid>
      <dc:creator>AndreaWeeg</dc:creator>
      <dc:date>2017-03-23T13:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680026#M63363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrea,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The view has a reference to the map. Try something like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcMap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;removeAll&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcMap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;destroy&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;$mainDiv&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".arc-div"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;remove&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680026#M63363</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T04:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680027#M63364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'll try that but i did write a simpler html with one of the samples they gave and this is the error it gets&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #222222; background-color: #fff0f0; margin-left: 4px;"&gt;&lt;SPAN class="" style="color: #545454; text-decoration: underline;"&gt;init.js:formatted:10450&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: red !important; background-color: #fff0f0;"&gt;Uncaught &lt;SPAN class="" style="font-size: 12px !important;"&gt;&lt;SPAN&gt;TypeError: Cannot read property 'remove' of undefined at Object.destroy (&lt;SPAN class="" style="color: #545454; text-decoration: underline;"&gt;init.js:formatted:10450&lt;/SPAN&gt;) at Object.destroy (&lt;SPAN class="" style="color: #545454; text-decoration: underline;"&gt;init.js:formatted:5872&lt;/SPAN&gt;) at closemap (&lt;SPAN class="" style="color: #545454; text-decoration: underline;"&gt;arctest.html:42&lt;/SPAN&gt;) at HTMLButtonElement.onclick (&lt;SPAN class="" style="color: #545454; text-decoration: underline;"&gt;arctest.html:49&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: red !important; background-color: #fff0f0;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: red !important; background-color: #fff0f0;"&gt;not sure if any esri developers monitor this site but this is the code that breaks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: red !important; background-color: #fff0f0;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: red !important; background-color: #fff0f0;"&gt;this._layersHandle.remove(); &amp;lt;--this line _layersHandle is null&amp;nbsp;&lt;BR /&gt; this._layersHandle = null;&lt;BR /&gt; this.layers.drain(this._lyrRemove, this)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:48:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680027#M63364</guid>
      <dc:creator>AndreaWeeg</dc:creator>
      <dc:date>2017-03-23T14:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680028#M63365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;still has a leak. and if i destroy the view it doesn't seem to work when i try to reload the map i just get a white screen so that seems to be a bug too&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 17:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680028#M63365</guid>
      <dc:creator>AndreaWeeg</dc:creator>
      <dc:date>2017-03-23T17:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680029#M63366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I'm unsure about the best way to remove a map and/or a view. &lt;SPAN&gt;Map.destroy and MapView/SceneView.destroy aren't documented&amp;nbsp;in the 4.X SDK, which sometimes means they're a little rough around the edges.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I would expect that&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;destroy&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
view &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as well as removing all your other references to the view&amp;nbsp;should be enough. &amp;nbsp;Looking at the state of the view after .destroy is called, most of its properties are set to null and the suspended&amp;nbsp;property is set to true, so even if you didn't set it to null, it's&amp;nbsp;not going to be doing a whole lot after destroy is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can confirm that map.destroy() is throwing an error, but it's not clear to me you would necessarily want to destroy the map when the user toggles the view open and closed, especially if they may toggle that map open again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I ask what happens if you leave the map alone and just destroy/recreate the view (based on the original&amp;nbsp;map) when the user toggles the map closed&amp;nbsp;and back open? &amp;nbsp;Another thing to test would be not destroying anything and just changing the visibility of the div containing the view.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:38:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680029#M63366</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-12T04:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680030#M63367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am opening a support ticket with them, could be a bug in the api since is so new there are things they might have missed. For now I think I am going to try to just have a global map and view so I don't need to destroy them I can just keep reusing them...not sure if it'll work and might be a lot of code change on my side but if it keeps the browser from crashing might be a good option until they can get someone to work on the ticket.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help!&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:48:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680030#M63367</guid>
      <dc:creator>AndreaWeeg</dc:creator>
      <dc:date>2017-03-24T13:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680031#M63368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;view.container = null&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;should have been enough, but there is a bug with it. &amp;nbsp;We will look at fixing that for next version (4.4).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 00:10:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680031#M63368</guid>
      <dc:creator>BjornSvensson</dc:creator>
      <dc:date>2017-04-06T00:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680032#M63369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has this been fixed?&amp;nbsp; I have come across the same issue with 4.5.&amp;nbsp; I see extra&amp;nbsp;DOM elements from previously adding and removing a MapView from the DOM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2017 00:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680032#M63369</guid>
      <dc:creator>JonMullen</dc:creator>
      <dc:date>2017-11-10T00:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680033#M63370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/251225"&gt;Jon Mullen&lt;/A&gt;‌ - yes, this was fixed in 4.4 (as far as we know).&amp;nbsp; Do you have a simple test app for 4.5 (or even better 4.6)&amp;nbsp;that shows the issue you're seeing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 17:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680033#M63370</guid>
      <dc:creator>BjornSvensson</dc:creator>
      <dc:date>2017-12-20T17:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680034#M63371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for taking a while to respond, but I had a mistake in my code.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 22:41:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680034#M63371</guid>
      <dc:creator>JonMullen</dc:creator>
      <dc:date>2018-01-17T22:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680035#M63372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;view.container = null&lt;/SPAN&gt; is illustrated on the following example which&amp;nbsp;toogle view from 2D to 3D:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/views-switch-2d-3d/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/views-switch-2d-3d/index.html"&gt;Switch view from 2D to 3D | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in Typescript, container property has to be an HTLMDivElement so you get an error (constructor&amp;nbsp;accepts&amp;nbsp;undefined though).&lt;/P&gt;&lt;P&gt;What would be the Typescript way then ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 18:38:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680035#M63372</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-06-06T18:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the 2d map from the dom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680036#M63373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;null should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you have enabled "--strictNullChecks" in your tsconfig?&lt;BR /&gt;&lt;A href="https://www.typescriptlang.org/docs/handbook/compiler-options.html"&gt;https://www.typescriptlang.org/docs/handbook/compiler-options.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 23:22:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-remove-the-2d-map-from-the-dom/m-p/680036#M63373</guid>
      <dc:creator>BjornSvensson</dc:creator>
      <dc:date>2018-06-11T23:22:38Z</dc:date>
    </item>
  </channel>
</rss>

