<?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: [esri.views.3d.state.ViewStateManager] #camera= Invalid camera in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288167#M81127</link>
    <description>&lt;P&gt;Do you have a repro application in codepen or stackblitz? Using your camera properties in this &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/scene-easy-navigate/" target="_blank" rel="noopener"&gt;Sample App&lt;/A&gt; works, so it could be something else, maybe an issue with the scene layer and basemap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just saw you have this &lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/error-when-adding-hosted-scene-layer/m-p/1288029#M81120" target="_blank" rel="noopener"&gt;other question&lt;/A&gt; here related to your scenelayer, so I'm going to guess it's probably related to that.&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2023 14:39:35 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2023-05-11T14:39:35Z</dc:date>
    <item>
      <title>[esri.views.3d.state.ViewStateManager] #camera= Invalid camera</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288026#M81119</link>
      <description>&lt;P&gt;Hi all, I am trying to display a scene layer shared on ArcGIS online. I encountered a problem when I initiated the SceneView with camera property. The source code is as below,&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;bSceneLayer&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;new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PAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;SceneView&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; container&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"viewDiv"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; map&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;map&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; camera: {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; heading&lt;/SPAN&gt;: &lt;SPAN class=""&gt;90&lt;/SPAN&gt;, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; tilt&lt;/SPAN&gt;: &lt;SPAN class=""&gt;45&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; position&lt;/SPAN&gt;: [ -&lt;SPAN class=""&gt;122&lt;/SPAN&gt;, &lt;SPAN class=""&gt;38&lt;/SPAN&gt;, &lt;SPAN class=""&gt;20000&lt;/SPAN&gt; ]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; });&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(The reason of initiating the map in this way is stated in another post)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The scene layer displays but the console shows me an error&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-05-11 at 10.54.19 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70397iAF0C277A4DB6719F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-05-11 at 10.54.19 AM.png" alt="Screenshot 2023-05-11 at 10.54.19 AM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The same error appeared when I tried to assign a new or cloned camera. And no effects when I tried to do view.goTo(...).&lt;/DIV&gt;&lt;DIV&gt;Why is this happened and how can I solve this error?&lt;BR /&gt;Thanks for helping&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 May 2023 03:03:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288026#M81119</guid>
      <dc:creator>Blakearc</dc:creator>
      <dc:date>2023-05-11T03:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: [esri.views.3d.state.ViewStateManager] #camera= Invalid camera</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288167#M81127</link>
      <description>&lt;P&gt;Do you have a repro application in codepen or stackblitz? Using your camera properties in this &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/scene-easy-navigate/" target="_blank" rel="noopener"&gt;Sample App&lt;/A&gt; works, so it could be something else, maybe an issue with the scene layer and basemap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just saw you have this &lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/error-when-adding-hosted-scene-layer/m-p/1288029#M81120" target="_blank" rel="noopener"&gt;other question&lt;/A&gt; here related to your scenelayer, so I'm going to guess it's probably related to that.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 14:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288167#M81127</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-05-11T14:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: [esri.views.3d.state.ViewStateManager] #camera= Invalid camera</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288431#M81131</link>
      <description>&lt;P&gt;Hi. Thank you for the reply.&lt;/P&gt;&lt;P&gt;Due to security issue, I am not able to provide a repo with my current model(layer), and I can't find any similar layer public on the internet. But yes, I think the error is related to the basemap. Everything works fine if I render only the basemap with a default string value from the doc. I am struggling because there is no specification of this error in the doc.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 01:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288431#M81131</guid>
      <dc:creator>Blakearc</dc:creator>
      <dc:date>2023-05-12T01:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: [esri.views.3d.state.ViewStateManager] #camera= Invalid camera</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288524#M81135</link>
      <description>&lt;P&gt;If you create a new camera object like this, the position of the camera defaults to WGS84:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;camera: {
  heading: 90, 
  tilt: 45,
  position: [ -122, 38, 20000 ]
}&lt;/LI-CODE&gt;&lt;P&gt;This is most likely incompatible with the spatial reference of your building scene layer, which is why scene view throws an error. Granted, the error message could provide a bit more information.&lt;/P&gt;&lt;P&gt;You can create a valid camera object like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;camera: {
  position: {
    x: -122,  /* replace with projected coordinate */
    y: 38, /* replace with projected coordinate */
    z: 20000,
    spatialReference: { wkid: 28992 /* Replace with wkid of your scene layer */ }
  },
  heading: 90,
  tilt: 45
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, instead of adding your building scene layer as a basemap, better add it as a layer to your map. This will make sure widgets like the layer list and legend work properly out-of-the-box:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const bSceneLayer = new BuildingSceneLayer({
  url: my_url,
 });

var map = new Map({
  layers: [bSceneLayer],
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps! Otherwise as Rene already pointed out, it would be good to have a running sample app you can share.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 11:23:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-views-3d-state-viewstatemanager-camera/m-p/1288524#M81135</guid>
      <dc:creator>ArnoFiva</dc:creator>
      <dc:date>2023-05-12T11:23:27Z</dc:date>
    </item>
  </channel>
</rss>

