<?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: Zoom Map to Set Of Points in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231034#M21597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, in your opinion, if i put this line of code : &lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'andale mono', monospace;"&gt;view.extent = view.graphics.fullExtent;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;, that will work ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Mar 2018 15:54:14 GMT</pubDate>
    <dc:creator>EssaddekMohammed</dc:creator>
    <dc:date>2018-03-26T15:54:14Z</dc:date>
    <item>
      <title>Zoom Map to Set Of Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231030#M21593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am building an arcgis map based application using the ArcGis javascript web API. I would like to know how to zoom out / in the map to view a full set of points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohammed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 09:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231030#M21593</guid>
      <dc:creator>EssaddekMohammed</dc:creator>
      <dc:date>2018-03-26T09:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom Map to Set Of Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231031#M21594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you supply some more detail? Is this using the 3.x or 4.x version of the API? Is your point dataset a feature layer?&lt;/P&gt;&lt;P&gt;Here are two reference on getting the full extent from a feature layer, for example:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fullExtent" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fullExtent"&gt;Layer | API Reference | ArcGIS API for JavaScript 4.6&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#fullextent" title="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#fullextent"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript 3.23&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 13:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231031#M21594</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2018-03-26T13:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom Map to Set Of Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231032#M21595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using the version 4, i am pushing my points directly into graphic layer.&lt;/P&gt;&lt;P&gt;Hope this help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 13:57:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231032#M21595</guid>
      <dc:creator>EssaddekMohammed</dc:creator>
      <dc:date>2018-03-26T13:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom Map to Set Of Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231033#M21596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The GraphicsLayer also has a fullExtent property&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-layers-GraphicsLayer.html#fullExtent" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#fullExtent"&gt;GraphicsLayer | API Reference | ArcGIS API for JavaScript 4.6&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 14:33:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231033#M21596</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2018-03-26T14:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom Map to Set Of Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231034#M21597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, in your opinion, if i put this line of code : &lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'andale mono', monospace;"&gt;view.extent = view.graphics.fullExtent;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;, that will work ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 15:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231034#M21597</guid>
      <dc:creator>EssaddekMohammed</dc:creator>
      <dc:date>2018-03-26T15:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom Map to Set Of Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231035#M21598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, that won't work like that. &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics" rel="nofollow noopener noreferrer" target="_blank"&gt;view.graphics&lt;/A&gt; returns a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Collection&lt;/A&gt; of graphics, not a GraphicsLayer, so you can't use the fullExtent method on that. The view's goTo method of the view can take an array of graphics or geometries. You can use something like this after adding the graphics to the view.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;setTimeout&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;goTo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;500&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'd need a timeout, since it takes a little time to add the graphics to the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you could add the graphics to a GraphicsLayer and watch for it to stop updating and zoom to its fullExtent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:13:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-map-to-set-of-points/m-p/231035#M21598</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T11:13:36Z</dc:date>
    </item>
  </channel>
</rss>

