<?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 get angle between two points to rotate the map View in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1459714#M84569</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to rotate the map view properly based on the two-point angle? Currently, I'm using Geodesic Distance but I'm not getting correct angle to rotate the map view &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-geodesicUtils.html#geodesicDistance" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-geodesicUtils.html#geodesicDistance&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help in advance&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2024 18:09:46 GMT</pubDate>
    <dc:creator>SaiPeketi</dc:creator>
    <dc:date>2024-05-13T18:09:46Z</dc:date>
    <item>
      <title>get angle between two points to rotate the map View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1459714#M84569</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to rotate the map view properly based on the two-point angle? Currently, I'm using Geodesic Distance but I'm not getting correct angle to rotate the map view &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-geodesicUtils.html#geodesicDistance" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-geodesicUtils.html#geodesicDistance&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help in advance&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 18:09:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1459714#M84569</guid>
      <dc:creator>SaiPeketi</dc:creator>
      <dc:date>2024-05-13T18:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: get angle between two points to rotate the map View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1462072#M84580</link>
      <description>&lt;P&gt;Can you share a Codepen or similar showing why you can't use the results of this method?&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 00:20:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1462072#M84580</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2024-05-14T00:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: get angle between two points to rotate the map View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1466194#M84597</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/11373"&gt;@JohnGrayson&lt;/a&gt;&amp;nbsp;Here is the Codepen example(&lt;A href="https://codepen.io/Andy0206/pen/mdYJBEX?editors=1000" target="_blank"&gt;https://codepen.io/Andy0206/pen/mdYJBEX?editors=1000&lt;/A&gt;) in which I'm trying to rotate the map view to make the polygon 90 degrees for one of my requirements. But the angle is not coming right as the second screenshot&lt;/P&gt;&lt;P&gt;I have a polygon like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SaiPeketi_0-1715702721381.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104062i7BB1137968513FE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SaiPeketi_0-1715702721381.png" alt="SaiPeketi_0-1715702721381.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and want to make the polygon to 90 degrees with it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SaiPeketi_1-1715702816668.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104063iD6815603BDF608BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SaiPeketi_1-1715702816668.png" alt="SaiPeketi_1-1715702816668.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:07:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1466194#M84597</guid>
      <dc:creator>SaiPeketi</dc:creator>
      <dc:date>2024-05-14T16:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: get angle between two points to rotate the map View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1467383#M84602</link>
      <description>&lt;P&gt;If I understand the docs correctly, geodesicDistance expects longitude/latitude coordinates, so you may need to project the point coordinates to get a correct azimuth between the points.&amp;nbsp; However (someone correct me if I'm mistaken), I don't think the azimuth you get from the geodesicDistance method will produce the expected result when applied to the web map that is displayed using the basemap's web mercator projection.&lt;/P&gt;&lt;P&gt;Maybe it is sufficient to just calculate the 2D angle between the two web mercator point coordinates?&amp;nbsp; For example, this &lt;A href="https://stackoverflow.com/questions/9614109/how-to-calculate-an-angle-from-points" target="_self"&gt;stackoverflow post&lt;/A&gt; covers how to do that.&amp;nbsp; I'm not aware of a method in the ArcGIS SDK provides a convenient way to calculate that.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 19:06:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1467383#M84602</guid>
      <dc:creator>mleahy_cl</dc:creator>
      <dc:date>2024-05-14T19:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: get angle between two points to rotate the map View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1468793#M84603</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;The error message when calling the method with your coordinates is:&lt;BR /&gt;&lt;STRONG&gt;message&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;"input geometry spatial reference is not supported"&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;Here's a slightly updated version that doesn't throw the error message:&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;A href="https://codepen.io/john-grayson/pen/LYoVmXG" target="_blank" rel="noopener"&gt;https://codepen.io/john-grayson/pen/LYoVmXG&lt;/A&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I hope this helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 22:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-angle-between-two-points-to-rotate-the-map/m-p/1468793#M84603</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2024-05-14T22:54:47Z</dc:date>
    </item>
  </channel>
</rss>

