<?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: MapView Extent-Change in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305235#M28011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's actually much easier to do in 4.0 now, because you don't need to know event strings to listen to. You want to know when view.extent changes, so you can just do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view.watch("extent", function(newValue, oldValue) {});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that's it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see more in the docs here. &lt;A href="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html" title="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html"&gt;Working with properties | ArcGIS API for JavaScript 4.0&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I've done a lot of posts on the Accessor, which is what powers all this, &lt;A href="http://odoe.net/blog/?s=accessor"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 May 2016 21:45:50 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2016-05-09T21:45:50Z</dc:date>
    <item>
      <title>MapView Extent-Change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305234#M28010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the Javascript API 4.0, I believe I'm to interact with the map via a MapView if I'm doing a 2D map. I couldn't help but notice that the events for the MapView are pretty bare, with only 4 supported events. If I wanted to have the map event of "extent-change" like in 3.16, is there a different process to hook into this event in 4.0? Or is this a feature to be added in the future?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 21:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305234#M28010</guid>
      <dc:creator>PaulYoum1</dc:creator>
      <dc:date>2016-05-09T21:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: MapView Extent-Change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305235#M28011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's actually much easier to do in 4.0 now, because you don't need to know event strings to listen to. You want to know when view.extent changes, so you can just do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view.watch("extent", function(newValue, oldValue) {});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that's it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see more in the docs here. &lt;A href="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html" title="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html"&gt;Working with properties | ArcGIS API for JavaScript 4.0&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I've done a lot of posts on the Accessor, which is what powers all this, &lt;A href="http://odoe.net/blog/?s=accessor"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 21:45:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305235#M28011</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2016-05-09T21:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: MapView Extent-Change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305236#M28012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about if you want to &lt;EM&gt;cancel &lt;/EM&gt;the given event you're "listening" to? For example, prevent zooming in/out beyond a certain level or extent, etc..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 21:50:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305236#M28012</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2016-05-09T21:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: MapView Extent-Change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305237#M28013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The watch method returns what&amp;nbsp; is called a WatchHandle that has a remove() method so you can stop listening for property changes.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#~WatchHandle" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#~WatchHandle"&gt;Accessor | API Reference | ArcGIS API for JavaScript 4.0&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The prevent zooming in/out beyond extent stuff is separate. You would want to look at the constraints of the View to define those. &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints"&gt;MapView | API Reference | ArcGIS API for JavaScript 4.0&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 22:01:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305237#M28013</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2016-05-09T22:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: MapView Extent-Change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305238#M28014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The extent example was the quickest thing I could think of that would illustrate that idea. Something else would be like aborting an apply edits command (which, I know, isn't yet in Version 4). Unlike what I was asking about, it sounds like accessors are geared towards "events" that you want to have happen then, no?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 22:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305238#M28014</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2016-05-09T22:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: MapView Extent-Change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305239#M28015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That would be an asynchronous task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Watching for property changes doesn't necessarily replace events. There are still events in the API, but watching for property changes let's you get real specific on what it is you care about that might change on an object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like you want to be able to cancel something like a QueryTask, or the applyEdits or similar. In that case, we don't really have a mechanism in place to cancel a task. It's something we can look at, but once the request is in flight, we could only at best ignore the result, it doesn't mean the request didn't go through to the service and your edits didn't apply though. Once the request is at the server, not much we can do to cancel that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 22:25:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-extent-change/m-p/305239#M28015</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2016-05-09T22:25:27Z</dc:date>
    </item>
  </channel>
</rss>

