<?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 set both camera and center positions in SceneView in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306188#M28099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think, in general, the center and camera properties are going to conflict with one another.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My recollection is that&amp;nbsp;setting the center (or extent) or a sceneview may change the position of the camera, but it won't change the tilt and heading of the camera. &amp;nbsp;It may be that you're expecting to be able to set the position of the camera and then set the center in order to rotate the camera so that it's facing the new center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get something close to this behavior, you could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// maintain current position of camera, but set the center&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// to something new&lt;/SPAN&gt;
view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'click'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; e &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;goTo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; target&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; position&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;camera&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;position
&amp;nbsp; &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="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;/SPAN&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;&lt;/P&gt;&lt;P&gt;I might be misunderstanding the behavior you're after though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:38:58 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2021-12-11T14:38:58Z</dc:date>
    <item>
      <title>How to set both camera and center positions in SceneView</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306187#M28098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’ve been scratching my head trying to figure out how to set both the camera position and the center position simultaneously in 3D. I’m used to being able to do just that in Three.js, but it seems when I try to set both positions in the Arcgis JavaScript API the result is never what I expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do it by using the goTo method and it didn’t work. I tried doing it by setting the camera and center property on the view, but that also didn’t work. The result is always that the camera or the center is correct, but not the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody knows how to do it? How to have both the camera and center be at specific desired positions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Christian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 18:23:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306187#M28098</guid>
      <dc:creator>ChristianMorin</dc:creator>
      <dc:date>2017-06-15T18:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to set both camera and center positions in SceneView</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306188#M28099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think, in general, the center and camera properties are going to conflict with one another.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My recollection is that&amp;nbsp;setting the center (or extent) or a sceneview may change the position of the camera, but it won't change the tilt and heading of the camera. &amp;nbsp;It may be that you're expecting to be able to set the position of the camera and then set the center in order to rotate the camera so that it's facing the new center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get something close to this behavior, you could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// maintain current position of camera, but set the center&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// to something new&lt;/SPAN&gt;
view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'click'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; e &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;goTo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; target&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; position&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;camera&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;position
&amp;nbsp; &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="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;/SPAN&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;&lt;/P&gt;&lt;P&gt;I might be misunderstanding the behavior you're after though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:38:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306188#M28099</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-11T14:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to set both camera and center positions in SceneView</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306189#M28100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for the prompt response. This does work if I want to change the center and keep the camera in the same position. So that's half my problem. I also want to be able to keep the same center but change the location of the camera. I tried using the pattern you described above, but it doesn't work for that case. Do you have an idea of how I can change the position of the camera keeping it looking at the same center?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Christian.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 22:04:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306189#M28100</guid>
      <dc:creator>ChristianMorin</dc:creator>
      <dc:date>2017-06-15T22:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to set both camera and center positions in SceneView</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306190#M28101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you're describing&amp;nbsp;is more or less the behavior when you hold down right mouse button and move the mouse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might try something like this:&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;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'click'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; e &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;// the map point will be an x/y point on the earth's&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;// surface.&amp;nbsp; to fix this, just maintain the current z&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;// of the camera&lt;/SPAN&gt;
&amp;nbsp; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;hasZ &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;z &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;camera&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;position&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;z&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;goTo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; target&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;center&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; position&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint
&amp;nbsp; &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="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;/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;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:39:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306190#M28101</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-11T14:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set both camera and center positions in SceneView</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306191#M28102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I still not working quite right for me. I'm also using a local scene, not a globe. I'll work on creating a small sample that outlines what I'm trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Christian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 20:24:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-both-camera-and-center-positions-in/m-p/306191#M28102</guid>
      <dc:creator>ChristianMorin</dc:creator>
      <dc:date>2017-06-16T20:24:40Z</dc:date>
    </item>
  </channel>
</rss>

