<?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: Any subsitute for extent-change in Arcgis Javascript 4? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1250503#M80012</link>
    <description>&lt;P&gt;When migrating to 4.x, I found it best to replace this by watching the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#stationary" target="_self"&gt;MapView.stationary&lt;/A&gt; property, in which case yours would translate to something like:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;mapView.watch("stationary", this.myFunction.bind(this));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and elsewhere, something like:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;myFunction: function(newValue, oldValue, propertyName, target) {
	if (newValue) {
		var extent = target.extent;

		//etc
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 19:10:23 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2023-01-23T19:10:23Z</dc:date>
    <item>
      <title>Any subsitute for extent-change in Arcgis Javascript 4?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1250482#M80011</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; I was working on Arcgis Javascript 3 with the below code.&lt;/P&gt;&lt;P&gt;on(this.map, "extent-change", lang.hitch(this, this.myfunction));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above line called myfunction during load of the map .But now I am working with ArcGIS JavaScript 4. Any idea how to replicate the same in version 4?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 18:18:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1250482#M80011</guid>
      <dc:creator>ADITYAKUMAR1</dc:creator>
      <dc:date>2023-01-23T18:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Any subsitute for extent-change in Arcgis Javascript 4?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1250503#M80012</link>
      <description>&lt;P&gt;When migrating to 4.x, I found it best to replace this by watching the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#stationary" target="_self"&gt;MapView.stationary&lt;/A&gt; property, in which case yours would translate to something like:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;mapView.watch("stationary", this.myFunction.bind(this));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and elsewhere, something like:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;myFunction: function(newValue, oldValue, propertyName, target) {
	if (newValue) {
		var extent = target.extent;

		//etc
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 19:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1250503#M80012</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-01-23T19:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Any subsitute for extent-change in Arcgis Javascript 4?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1251266#M80049</link>
      <description>&lt;P&gt;Also, here are some good example apps related to extent changes from the SDK:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/watch-for-changes-reactiveutils/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/watch-for-changes-reactiveutils/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/event-explorer/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/event-explorer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/watch-for-changes/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/watch-for-changes/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 14:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1251266#M80049</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2023-01-25T14:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Any subsitute for extent-change in Arcgis Javascript 4?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1252417#M80076</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Thanks for the response. I managed to do it in a different way.&lt;/P&gt;&lt;P&gt;map.View.watch("zoom", (evt) =&amp;gt; {&lt;BR /&gt;if (Number.isInteger(evt)) {&lt;BR /&gt;this.myfunction();&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its working for now but this doesnt work when we work with custom base maps.I am not sure why it only works with default basemap gallery.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aditya Kumar&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 16:52:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1252417#M80076</guid>
      <dc:creator>ADITYAKUMAR1</dc:creator>
      <dc:date>2023-01-27T16:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Any subsitute for extent-change in Arcgis Javascript 4?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1252425#M80077</link>
      <description>&lt;P&gt;The 3.x "extent-change" event will fire when the user pans the map, but your 4.x solution will not.&amp;nbsp; Is that what you intend?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 17:06:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1252425#M80077</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-01-27T17:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Any subsitute for extent-change in Arcgis Javascript 4?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1252444#M80078</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;no not on extent change but on scale change Or a change in zoom level.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 17:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-subsitute-for-extent-change-in-arcgis/m-p/1252444#M80078</guid>
      <dc:creator>ADITYAKUMAR1</dc:creator>
      <dc:date>2023-01-27T17:44:46Z</dc:date>
    </item>
  </channel>
</rss>

