<?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 Detecting Zoom Start and end, and pan in 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detecting-zoom-start-and-end-and-pan-in-4-x/m-p/1473220#M84614</link>
    <description>&lt;P&gt;I am migrating an older web interface to the newer java api 4.x. In the older interface I could make calls, such as these to detect when the map was zoomed in, out, or panned.&lt;/P&gt;&lt;P&gt;dojo.connect(map, "onZoomStart", showLoadingSpinner);&lt;BR /&gt;dojo.connect(map, "onPanStart", showLoadingSpinner);&lt;/P&gt;&lt;P&gt;I can do something similar with the following code, but it is not as granular and a bit difficult to detect when different parts of the interface have been updated, including when the process is complete. For example if the sketch is active, I believe it trips the updating. Are there any better suggestions of detecting these actions?&lt;/P&gt;&lt;P&gt;const handle = reactiveUtils.when(&lt;BR /&gt;() =&amp;gt; view.updating,&lt;BR /&gt;() =&amp;gt; {&lt;BR /&gt;console.log('updating');&lt;BR /&gt;console.log(view.updating);&lt;BR /&gt;showLoadingSpinner();&lt;BR /&gt;},&lt;BR /&gt;{ once: false }&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2024 21:12:59 GMT</pubDate>
    <dc:creator>DanielScholes</dc:creator>
    <dc:date>2024-05-15T21:12:59Z</dc:date>
    <item>
      <title>Detecting Zoom Start and end, and pan in 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detecting-zoom-start-and-end-and-pan-in-4-x/m-p/1473220#M84614</link>
      <description>&lt;P&gt;I am migrating an older web interface to the newer java api 4.x. In the older interface I could make calls, such as these to detect when the map was zoomed in, out, or panned.&lt;/P&gt;&lt;P&gt;dojo.connect(map, "onZoomStart", showLoadingSpinner);&lt;BR /&gt;dojo.connect(map, "onPanStart", showLoadingSpinner);&lt;/P&gt;&lt;P&gt;I can do something similar with the following code, but it is not as granular and a bit difficult to detect when different parts of the interface have been updated, including when the process is complete. For example if the sketch is active, I believe it trips the updating. Are there any better suggestions of detecting these actions?&lt;/P&gt;&lt;P&gt;const handle = reactiveUtils.when(&lt;BR /&gt;() =&amp;gt; view.updating,&lt;BR /&gt;() =&amp;gt; {&lt;BR /&gt;console.log('updating');&lt;BR /&gt;console.log(view.updating);&lt;BR /&gt;showLoadingSpinner();&lt;BR /&gt;},&lt;BR /&gt;{ once: false }&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 21:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detecting-zoom-start-and-end-and-pan-in-4-x/m-p/1473220#M84614</guid>
      <dc:creator>DanielScholes</dc:creator>
      <dc:date>2024-05-15T21:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting Zoom Start and end, and pan in 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detecting-zoom-start-and-end-and-pan-in-4-x/m-p/1477374#M84694</link>
      <description>&lt;P&gt;If your methods are navigating via the goTo() method, you could watch the 'animating' property&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#animation

From the example:
reactiveUtils.watch(
  () =&amp;gt; view.animation,
  (response) =&amp;gt; {
    if(response?.state === "running"){
      console.log("Animation in progress");
    } else{
     console.log("No animation");
    }
  }
);&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 May 2024 22:36:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/detecting-zoom-start-and-end-and-pan-in-4-x/m-p/1477374#M84694</guid>
      <dc:creator>JamesIng</dc:creator>
      <dc:date>2024-05-22T22:36:06Z</dc:date>
    </item>
  </channel>
</rss>

