AnsweredAssumed Answered

Buffer multiple drawings - error when drawing are of different types

Question asked by bhavdeeps on Jul 26, 2013
Latest reply on Jul 31, 2013 by bhavdeeps
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.
e.g.
If I draw 4 lines/polylines on a map and hit buffer, all 4 are buffered.
If I draw 3 polygons and buffer, all 3 are buffered.

But when I draw one line and one polygon, I get an error.

I tracked the network response and I got this:
"error":
"code":400,"
message":" Unable to complete Buffer operation.",
"details":["The specified geometry is not in the correct format."]}

Code is here:
http://jsfiddle.net/x7WDQ/4/

I modified the ESRI sample so you can draw the lines/polygons initially and then click on a button to draw all buffers together.

The following steps will work:
Click on "Clear Graphics" button
Click on the "Line" button.
Draw 3 lines.
Click on "Draw Buffer" button.
This will draw 3 buffers around the 3 lines.

The following steps will work:
Click on "Clear Graphics" button
Click on the "polygon" button.
Draw 1 polygon.
Click on the "freehand polygon" button.
Draw 1 polygon.
Click on "Draw Buffer" button.
This will draw 2 buffers around the 2 different types of polygons.

Produce the Error:
Click on "Clear Graphics" button
Click on the "Line" button.
Draw 1 line.
Click on the "polygon" button.
Draw 1 polygon.

This will error out on a couple of seconds.

I saw the "gsvc.simplify" statement in the sample but it looks like I don't really need it for the polygons.

Outcomes