<?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 Creation of a second 3D Scene after some seconds fails in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creation-of-a-second-3d-scene-after-some-seconds/m-p/556204#M51883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the attached Sample (map.html) following code is executed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var view1 = create3DView("view1Div");
 view1.then(function() { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimeout(function() { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; view1.destroy(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimeout(function(){ 
&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;&amp;nbsp; var view2 = create3DView("view2Div"); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },1000); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },1000);
 });
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should simulate an effect I observed by implementing a 2D/3D Switch. If I switch from 3D to 2D and then back to 3D the creation of the second 3D view fails with the error message "Uncaught TypeError: Cannot read property 'currentCamera' of null" in SceneView.js:1253.&lt;/P&gt;&lt;P&gt;The sample map.html simulates the behavior by creation of a 3D View (view1), destruction of the view1 after 1 second and after a second it tries to create a new 3D view (view2), which produces the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Note: if I directly create second 3D View, without the wait for the first or with shorter timeouts then it works. In the sample above it is not important if I destroy the view1. The error happens also If I just try to create a second 3D View after some seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if I do anything wrong here or if this is a bug? Is there a workaround for the problem? Or has somebody else observed this behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:01:40 GMT</pubDate>
    <dc:creator>MarkoReiprecht</dc:creator>
    <dc:date>2021-12-12T00:01:40Z</dc:date>
    <item>
      <title>Creation of a second 3D Scene after some seconds fails</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creation-of-a-second-3d-scene-after-some-seconds/m-p/556204#M51883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the attached Sample (map.html) following code is executed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var view1 = create3DView("view1Div");
 view1.then(function() { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimeout(function() { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; view1.destroy(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimeout(function(){ 
&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;&amp;nbsp; var view2 = create3DView("view2Div"); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },1000); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },1000);
 });
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should simulate an effect I observed by implementing a 2D/3D Switch. If I switch from 3D to 2D and then back to 3D the creation of the second 3D view fails with the error message "Uncaught TypeError: Cannot read property 'currentCamera' of null" in SceneView.js:1253.&lt;/P&gt;&lt;P&gt;The sample map.html simulates the behavior by creation of a 3D View (view1), destruction of the view1 after 1 second and after a second it tries to create a new 3D view (view2), which produces the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Note: if I directly create second 3D View, without the wait for the first or with shorter timeouts then it works. In the sample above it is not important if I destroy the view1. The error happens also If I just try to create a second 3D View after some seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if I do anything wrong here or if this is a bug? Is there a workaround for the problem? Or has somebody else observed this behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:01:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creation-of-a-second-3d-scene-after-some-seconds/m-p/556204#M51883</guid>
      <dc:creator>MarkoReiprecht</dc:creator>
      <dc:date>2021-12-12T00:01:40Z</dc:date>
    </item>
  </channel>
</rss>

