<?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: 4.29 Breaking Change: MapView.goTo w/ rotation in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1406612#M84244</link>
    <description>&lt;P&gt;I've asked this before, but wanting to confirm again. Are patch release notes posted anywhere?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2024 19:50:49 GMT</pubDate>
    <dc:creator>AddisonShaw</dc:creator>
    <dc:date>2024-04-05T19:50:49Z</dc:date>
    <item>
      <title>4.29 Breaking Change: MapView.goTo w/ rotation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1403039#M84165</link>
      <description>&lt;P&gt;The 4.29 implementation of &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo" target="_self"&gt;MapView.goTo&lt;/A&gt; has changed in an undocumented way that produces different results than 4.28 and prior, particularly in regards to rotation.&amp;nbsp; Our framework allows the user to change the map rotation via various means, and we use goTo in order to animate the change in rotation, rather than setting the rotation property directly (which causes an instant change).&lt;/P&gt;&lt;P&gt;In code, it looks like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.goTo({rotation:rotation});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When doing this in 4.28 and prior, the map scale was preserved, but not the extent.&amp;nbsp; Starting in 4.29, the extent is preserved, but not the scale.&amp;nbsp; In order to visualize this, see the images below.&amp;nbsp; The first one is the starting state, where rotation is zero (i.e. North is "up"):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rotation_1.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99482i2D727E3760C8AC4B/image-size/large?v=v2&amp;amp;px=999" role="button" title="rotation_1.png" alt="rotation_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, let's say the user wants to rotate the map 90 degrees counter-clockwise so that East is "up".&amp;nbsp; (In the code, we'd set the rotation value to 270.)&amp;nbsp; Here's what it looks like in 4.28:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rotation_428.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99483iD9D0F24DED65C476/image-size/large?v=v2&amp;amp;px=999" role="button" title="rotation_428.png" alt="rotation_428.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We see the scale has stayed the same, which is the expected behavior.&amp;nbsp; However, here's what it looks like in 4.29:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rotation_429.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99484iAF4E6CD463CF1F3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="rotation_429.png" alt="rotation_429.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We see that the map has zoomed out one level in this case.&amp;nbsp; Were my browser maximized at the time, it would've zoomed out two levels instead.&amp;nbsp; If the user were to repeat this process, the map would continue to zoom out each time.&lt;/P&gt;&lt;P&gt;Fortunately, this is fairly easy to work around by adding the "center" and "scale" properties in the call to goTo:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.goTo({
	rotation: rotation,
	center: view.center.clone(),
	scale: view.scale
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a side note, simply setting the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#rotation" target="_self"&gt;rotation&lt;/A&gt; property directly continues to work as before, where scale is preserved.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 01:13:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1403039#M84165</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-03-30T01:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: 4.29 Breaking Change: MapView.goTo w/ rotation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1403946#M84181</link>
      <description>&lt;P&gt;Hi there Joel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reporting this issue! So yes we did change the MapView.goTo() behavior to go to the entire extent of the given geometry while considering the view.rotation. At 4.28, goTo looked liked this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-04-01 at 10.16.59 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99652iAF05A1DE03B95081/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-04-01 at 10.16.59 AM.png" alt="Screenshot 2024-04-01 at 10.16.59 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We changed this behavior to show the whole extent&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-04-01 at 10.17.06 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99653i5487C3DBC84D540B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-04-01 at 10.17.06 AM.png" alt="Screenshot 2024-04-01 at 10.17.06 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With this behavior change, we introduced the bug you describe. I will create an issue to fix this bug. Thank you very much for putting the workaround here too. I will update you once we have a fix.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 17:19:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1403946#M84181</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2024-04-01T17:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: 4.29 Breaking Change: MapView.goTo w/ rotation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1406080#M84233</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We addressed the issue and the fix will be available on&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://js.arcgis.com/next" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/next&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;after next Tuesday. Please test it out and let us know if it is working as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for reporting this issue.&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 21:32:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1406080#M84233</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2024-04-04T21:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: 4.29 Breaking Change: MapView.goTo w/ rotation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1406612#M84244</link>
      <description>&lt;P&gt;I've asked this before, but wanting to confirm again. Are patch release notes posted anywhere?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 19:50:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-29-breaking-change-mapview-goto-w-rotation/m-p/1406612#M84244</guid>
      <dc:creator>AddisonShaw</dc:creator>
      <dc:date>2024-04-05T19:50:49Z</dc:date>
    </item>
  </channel>
</rss>

