<?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: How do I find the extent of an array of graphics in JS API 4.x? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368327#M34166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is incredibly helpful, thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With ESRI's removal of the ability to ensure a feature set fits the extent on zoom, this works as a great solution.&lt;BR /&gt;&lt;BR /&gt;Truly, truly missing the ability to ensure the set extent fits on zoom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Feb 2018 17:02:30 GMT</pubDate>
    <dc:creator>ClintonCrick</dc:creator>
    <dc:date>2018-02-08T17:02:30Z</dc:date>
    <item>
      <title>How do I find the extent of an array of graphics in JS API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368324#M34163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a 4.x version of &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/esri.graphicsutils-amd.html#graphicsextent" title="https://developers.arcgis.com/javascript/3/jsapi/esri.graphicsutils-amd.html#graphicsextent"&gt;esri/graphicsUtils? &lt;/A&gt;I'm trying to zoom to the extent of my IdentifyResult after hydrating the graphics into a GraphicsLayer. The GraphicsLayer, by default has an extent of the world, but it's not updated when graphics are added to it. Maybe this ability has moved to somewhere else in the 4.x API? Or, if someone has some code that could manually expand the extent as the response.results come in, I'd be&amp;nbsp;very gracious!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368324#M34163</guid>
      <dc:creator>MattRahr</dc:creator>
      <dc:date>2017-03-20T19:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find the extent of an array of graphics in JS API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368325#M34164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You dont need graphicUtils to do that in 4.x. The mapView.goTo method takes Graphic[] as paramter and will zoom to the location of the graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo"&gt;MapView | API Reference | ArcGIS API for JavaScript 4.3&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:08:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368325#M34164</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2017-03-20T19:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find the extent of an array of graphics in JS API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368326#M34165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know if it would be helpful, but I was able use extent.expand() on an array of point graphics using two goTo() calls. &amp;nbsp;Don't animate the first and call the second after the first resolves. &amp;nbsp;That way, you can capture the view's extent on the first goTo() and expand on the second. &amp;nbsp;Could be a workaround until graphicsUtils is added to 4.x. &amp;nbsp;Hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;view.goTo(results.features, {animate: false}).then(function(response) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var zoomView = {};&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zoomView = view.extent.expand(2.0);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;view.goTo(zoomView);&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 01:51:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368326#M34165</guid>
      <dc:creator>BethManghi</dc:creator>
      <dc:date>2017-08-23T01:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find the extent of an array of graphics in JS API 4.x?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368327#M34166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is incredibly helpful, thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With ESRI's removal of the ability to ensure a feature set fits the extent on zoom, this works as a great solution.&lt;BR /&gt;&lt;BR /&gt;Truly, truly missing the ability to ensure the set extent fits on zoom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 17:02:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-find-the-extent-of-an-array-of-graphics/m-p/368327#M34166</guid>
      <dc:creator>ClintonCrick</dc:creator>
      <dc:date>2018-02-08T17:02:30Z</dc:date>
    </item>
  </channel>
</rss>

