<?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: Buffer around all geometries in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712531#M66221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You rock!&amp;nbsp; It was so simple!&amp;nbsp; Now I feel dumb for missing that property.&amp;nbsp; I was trying to figure how to make esri/dijit/editing/Union or &lt;SPAN class="str"&gt;esri/dijit/analysis/MergeLayers work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str"&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Aug 2014 21:47:09 GMT</pubDate>
    <dc:creator>DanielWebb2</dc:creator>
    <dc:date>2014-08-26T21:47:09Z</dc:date>
    <item>
      <title>Buffer around all geometries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712527#M66217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m looking to create one buffer around multiple graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user clicks the desired polygons, which creates graphics matching the geometry of the polygons. After certain ones are picked I want to buffer around all of those with the same shape they all have together.&amp;nbsp; Below is the code I’m trying for the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It always break on gsvc.buffer(params, showBuffer); which makes me think there’s a problem with the params.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;var geom = new Graphic();&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;geom = graphicsLayer.graphics;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;var selectedGeom = graphicsUtils.getGeometries(geom);&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;var bufferDist = Math.floor(dom.byId("txtBufferDist").value);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;var params = new BufferParameters();&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;params.geometries = [selectedGeom];&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;params.distances = [bufferDist];&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;params.unit = GeometryService.UNIT_FOOT;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;params.outSpatialReference = bcMap.spatialReference;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;gsvc.buffer(params, showBuffer);&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;function showBuffer(){&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Code&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOWEVER, if I use graphicsUtils.graphicsExtent instead of graphicsUtils.getGeometries it works. But I don’t want a square every time. I want the buffer to follow the outline shape as seen in yellow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="BufferExtent.PNG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/3830_BufferExtent.PNG" style="width: 620px; height: 413px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2014 23:58:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712527#M66217</guid>
      <dc:creator>DanielWebb2</dc:creator>
      <dc:date>2014-08-22T23:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer around all geometries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712528#M66218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So it looks like your issue is that graphicUtil.getGeometries returns an array and you then are putting that array inside another array here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14087701030252111" jivemacro_uid="_14087701030252111"&gt;
&lt;P&gt;params.geometries = [selectedGeom];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14087701289543632 jive_text_macro" jivemacro_uid="_14087701289543632"&gt;
&lt;P&gt;params.geometries = selectedGeom;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also are start the geom var as a Graphics and then overwrite it with an array of Graphics:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14087702317136132 jive_text_macro" jivemacro_uid="_14087702317136132"&gt;
&lt;P style="padding-left: 45px;"&gt;var geom = new Graphic();&lt;/P&gt;
&lt;P style="padding-left: 45px;"&gt;geom = graphicsLayer.graphics;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is no big deal as you are overwriting it but there is no need to start it as a Graphic and then set it to an Array. This would make more sense:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14087703216124468" jivemacro_uid="_14087703216124468" modifiedtitle="true"&gt;
&lt;P style="padding-left: 45px;"&gt;var graphics = graphicsLayer.graphics;&lt;/P&gt;
&lt;P style="padding-left: 45px;"&gt;var selectedGeoms = graphicsUtils.getGeometries(graphics);&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Aug 2014 05:07:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712528#M66218</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-08-23T05:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer around all geometries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712529#M66219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a ton! That basically got it.&amp;nbsp; Now it makes a graphic around each polygon.&amp;nbsp; This at least gets past my wall gives me something else to look into.&amp;nbsp; I’m hoping to get one single graphic as a buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="BufferExtent2.PNG" class="jive-image image-1" height="345" src="https://community.esri.com/legacyfs/online/5350_BufferExtent2.PNG" style="height: 345px; width: 468.0525164113786px;" width="468" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 21:24:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712529#M66219</guid>
      <dc:creator>DanielWebb2</dc:creator>
      <dc:date>2014-08-26T21:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer around all geometries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712530#M66220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for that you just need to set the unionResults to true for the BufferParameters&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 21:29:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712530#M66220</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-08-26T21:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer around all geometries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712531#M66221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You rock!&amp;nbsp; It was so simple!&amp;nbsp; Now I feel dumb for missing that property.&amp;nbsp; I was trying to figure how to make esri/dijit/editing/Union or &lt;SPAN class="str"&gt;esri/dijit/analysis/MergeLayers work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str"&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 21:47:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-around-all-geometries/m-p/712531#M66221</guid>
      <dc:creator>DanielWebb2</dc:creator>
      <dc:date>2014-08-26T21:47:09Z</dc:date>
    </item>
  </channel>
</rss>

