<?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: Detach and reattach a map view to a container in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340566#M31527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a work around that works well enough. I can keep the same map in memory, but I have to create a new MapView to get it to reattach correctly. I have to save information about the center, zoom, scale, etc. to make sure that the view comes back the same as it was before, but at least I don't have to recreate the map and the layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I modified my fiddle here&amp;nbsp;&lt;A class="link-titled" href="https://jsfiddle.net/cb8nqk9q/3/" title="https://jsfiddle.net/cb8nqk9q/3/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;to show the work around.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jul 2017 16:32:54 GMT</pubDate>
    <dc:creator>TJRockefeller</dc:creator>
    <dc:date>2017-07-06T16:32:54Z</dc:date>
    <item>
      <title>Detach and reattach a map view to a container</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340563#M31524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on an application with a dynamic layout, and I would like to be able to close (remove) the map from the page, and then later reattach the map that was removed to a new HTML container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for detaching from the page I was trying&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; view.container = null;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for reattaching to the page I am just assigning the HTMLDivElement to the container&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; view.container = divContainerElement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do this it just kind of works. The widgets that I have set up on the view show up in my container, but the actual map is not shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main difference that I can see in the html is that when the map is initially added there are several child elements inside of &amp;lt;div class="esri-view-surface"... , and after I detach and reattach then the element &amp;lt;div class="esri-view-surface"... has no child elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is what I'm talking about even possible, or is it something that will be available in a future release?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using arcgis-js-api 4.3.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A fiddle with a very basic setup of what I'm trying to do is here&amp;nbsp;&lt;A class="link-titled" href="https://jsfiddle.net/cb8nqk9q/" title="https://jsfiddle.net/cb8nqk9q/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you press the detach button it will remove the map, and when you reattach you will see that the map kind of comes back with the zoom widget visible and the footer information visible, but no map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 21:13:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340563#M31524</guid>
      <dc:creator>TJRockefeller</dc:creator>
      <dc:date>2017-07-05T21:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Detach and reattach a map view to a container</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340564#M31525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the 4.4 release notes, bug fixes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="color: #4c4c4c; font-size: 0.9375rem; margin-left: 0.775rem; margin-bottom: 1.55rem;"&gt;&lt;LI style="margin: 0.3875rem 0px 0.3875rem 1.5rem;"&gt;BUG-000104500: It is now possible to uninstantiate the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#container" style="color: #0079c1; text-decoration: none;"&gt;MapView's container&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and reinstantiate.&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wondering if this could be related to your issue? Perhaps try out your code in a 4.4 version as a test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2017 00:34:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340564#M31525</guid>
      <dc:creator>JordanKing3</dc:creator>
      <dc:date>2017-07-06T00:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Detach and reattach a map view to a container</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340565#M31526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately that bug fix doesn't seem to be related. I updated my fiddle here&amp;nbsp;&lt;A class="link-titled" href="https://jsfiddle.net/cb8nqk9q/1/" title="https://jsfiddle.net/cb8nqk9q/1/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;&amp;nbsp;to use 4.4 and it is still showing the same problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2017 14:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340565#M31526</guid>
      <dc:creator>TJRockefeller</dc:creator>
      <dc:date>2017-07-06T14:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Detach and reattach a map view to a container</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340566#M31527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a work around that works well enough. I can keep the same map in memory, but I have to create a new MapView to get it to reattach correctly. I have to save information about the center, zoom, scale, etc. to make sure that the view comes back the same as it was before, but at least I don't have to recreate the map and the layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I modified my fiddle here&amp;nbsp;&lt;A class="link-titled" href="https://jsfiddle.net/cb8nqk9q/3/" title="https://jsfiddle.net/cb8nqk9q/3/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;to show the work around.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2017 16:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/340566#M31527</guid>
      <dc:creator>TJRockefeller</dc:creator>
      <dc:date>2017-07-06T16:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Detach and reattach a map view to a container</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/1568654#M86262</link>
      <description>&lt;P&gt;There is a suspended property in the view that is causing it to stop rendering&lt;/P&gt;</description>
      <pubDate>Sat, 14 Dec 2024 05:51:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detach-and-reattach-a-map-view-to-a-container/m-p/1568654#M86262</guid>
      <dc:creator>EdwardSheehan</dc:creator>
      <dc:date>2024-12-14T05:51:46Z</dc:date>
    </item>
  </channel>
</rss>

