<?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: Can I zoom into a polygon with buffer? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-zoom-into-a-polygon-with-buffer/m-p/164281#M15265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You have to use the GeometryService buffer method first and use the returned promise to set the maps extent.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/geometryservice-amd.html#buffer" title="https://developers.arcgis.com/javascript/3/jsapi/geometryservice-amd.html#buffer"&gt;GeometryService | API Reference | ArcGIS API for JavaScript 3.19 | buffer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2017 16:53:14 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2017-02-21T16:53:14Z</dc:date>
    <item>
      <title>Can I zoom into a polygon with buffer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-zoom-into-a-polygon-with-buffer/m-p/164280#M15264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to let the map zoom into a free-draw polygon’s buffer; the buffer can be 10 – 100 miles defined by the users, the buffer value is defined as BufferDistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know for a circle with buffer, it can be defined such as &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var circleBuffer = new Circle(centerPoint, {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "radius": this.circle.radiusValue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And then the map extent is set as:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;this.map.setExtent(circleBuffer.getExtent());&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I test this circle statement, it can zoom into the circle buffer very well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: what if I want to zoom into a free-draw &lt;STRONG&gt;polygon with buffer&lt;/STRONG&gt;? How do I get the extent of this polygon with buffer (&lt;STRONG&gt;not just polygon itself&lt;/STRONG&gt;)? &amp;nbsp;In &lt;STRONG&gt;esri/geometry domain&lt;/STRONG&gt;, a polygon constructor does not include any optional parameter like radius/buffer.&amp;nbsp;I tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;this.map.setExtent(polygon.geometry.getExtent());&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It can only zoom into the polygon itself, not the polygon buffer. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2017 16:41:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-zoom-into-a-polygon-with-buffer/m-p/164280#M15264</guid>
      <dc:creator>LindaM</dc:creator>
      <dc:date>2017-02-21T16:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can I zoom into a polygon with buffer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-zoom-into-a-polygon-with-buffer/m-p/164281#M15265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You have to use the GeometryService buffer method first and use the returned promise to set the maps extent.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/geometryservice-amd.html#buffer" title="https://developers.arcgis.com/javascript/3/jsapi/geometryservice-amd.html#buffer"&gt;GeometryService | API Reference | ArcGIS API for JavaScript 3.19 | buffer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2017 16:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-zoom-into-a-polygon-with-buffer/m-p/164281#M15265</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-02-21T16:53:14Z</dc:date>
    </item>
  </channel>
</rss>

