<?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 multiple drawings - error when drawing are of different types in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759152#M70261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;based on my experience with buffering in ArcGIS Desktop, i am under the impression that the entire collection of geometries you pass to the buffer operation of the geometry service must share the same geometry type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this means that you'll have to submit your polylines in one request and your polygons in another.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jul 2013 22:39:47 GMT</pubDate>
    <dc:creator>JohnGravois</dc:creator>
    <dc:date>2013-07-26T22:39:47Z</dc:date>
    <item>
      <title>Buffer multiple drawings - error when drawing are of different types</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759151#M70260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to buffer multiple drawings. It works great when the drawing types are the same but errors out with the drawing types are different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I draw 4 lines/polylines on a map and hit buffer, all 4 are buffered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I draw 3 polygons and buffer, all 3 are buffered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I draw one line and one polygon, I get an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tracked the network response and I got this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"error":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"code":400,"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;message":" Unable to complete Buffer operation.",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"details":["The specified geometry is not in the correct format."]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code is here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/x7WDQ/4/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/x7WDQ/4/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I modified the ESRI sample so you can draw the lines/polygons initially and then click on a button to draw all buffers together. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following steps will work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on "Clear Graphics" button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on the "Line" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Draw 3 lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on "Draw Buffer" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This will draw 3 buffers around the 3 lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following steps will work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on "Clear Graphics" button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on the "polygon" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Draw 1 polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on the "freehand polygon" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Draw 1 polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on "Draw Buffer" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This will draw 2 buffers around the 2 different types of polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Produce the Error:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on "Clear Graphics" button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on the "Line" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Draw 1 line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on the "polygon" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Draw 1 polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will error out on a couple of seconds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I saw the "&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;gsvc.simplify&lt;/SPAN&gt;&lt;SPAN&gt;" statement in the sample but it looks like I don't really need it for the polygons.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759151#M70260</guid>
      <dc:creator>BhavdeepSachdev</dc:creator>
      <dc:date>2013-07-26T17:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer multiple drawings - error when drawing are of different types</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759152#M70261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;based on my experience with buffering in ArcGIS Desktop, i am under the impression that the entire collection of geometries you pass to the buffer operation of the geometry service must share the same geometry type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this means that you'll have to submit your polylines in one request and your polygons in another.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 22:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759152#M70261</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-07-26T22:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer multiple drawings - error when drawing are of different types</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759153#M70262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just tried buffering different geometry types in ArcGIS Desktop 10.1. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It works fine. So it is possible in Desktop.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 15:44:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759153#M70262</guid>
      <dc:creator>BhavdeepSachdev</dc:creator>
      <dc:date>2013-07-29T15:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer multiple drawings - error when drawing are of different types</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759154#M70263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i was referring to the buffer &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//000800000019000000"&gt;geoprocessing tool&lt;/A&gt;&lt;SPAN&gt; in ArcMap (which only accepts one layer with one geometry type at a time).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm not sure where/how you're buffering multiple geometry types.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 19:51:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759154#M70263</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-07-29T19:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer multiple drawings - error when drawing are of different types</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759155#M70264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In ArcMap, I can make drawings of 3 different geometry types and then I can run a Buffer wizard to create buffers around it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to replicate this using ArcGIS JavaScript API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Screen captures of what I did on ArcMap are attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]26331[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]26332[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 20:18:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759155#M70264</guid>
      <dc:creator>BhavdeepSachdev</dc:creator>
      <dc:date>2013-07-30T20:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer multiple drawings - error when drawing are of different types</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759156#M70265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;GeometryServer--&amp;gt;Buffer only accepts one geometry type at a time. ArcMap is sorting the geometry by type, buffering and returning the buffers with the "wizard" which someone wrote to take advantage of multiple functionalities within ArcMap. To do the same in jsapi you'll need to develop the functionality yourself. Write a series of functions that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) check number of geometry types&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IF 1 GEOMETRY TYPE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) execute simple buffer task&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) add results to map&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ELSE IF 2 OR MORE GEOMETRY TYPES:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) sort the geometry by type&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) create a deferred list of buffer tasks; one deferred for each geometry type being buffered&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4) add the collective results to the map when all the tasks are complete&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 21:07:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759156#M70265</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2013-07-30T21:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer multiple drawings - error when drawing are of different types</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759157#M70266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. Maybe I should add this as a suggestion for ESRI to include in their APIs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 18:23:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-multiple-drawings-error-when-drawing-are-of/m-p/759157#M70266</guid>
      <dc:creator>BhavdeepSachdev</dc:creator>
      <dc:date>2013-07-31T18:23:23Z</dc:date>
    </item>
  </channel>
</rss>

