1

In my ArcGIS Javascript 3.12 application I am drawing a freehand polygon, clicking a "Save" button and adding the polygon to my feature layer. This works correctly except when the polygon crosses itself (Image 1).

When the polygon crosses itself and save is clicked, the success function runs and everything appears to be working. When I open the attribute table in ArcMap to look at the polygon it has "empty" spatial values (Image 2).

Does anyone have any ideas?

I can provide code samples if needed.

Image 1

Image 1

Image 2

enter image description here

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Mar 5, 2015 at 21:29

1 Answer 1

3

up until yesterday you would have had to invoke a web request to a geometry service to validate the topological correctness of your feature before passing the edit, but as of 3.13 you can now use the local geometry engine and call simplify()

answered Mar 8, 2015 at 1:21
4
  • Thanks John, it will be interesting to explore the new geometry engine in 3.13. Commented Mar 9, 2015 at 15:44
  • I tried using the simplify() method from the geometryEngine and was thrown an error. What are the requirements for the geometry object passed in this method? Commented Mar 9, 2015 at 21:23
  • not sure. i can't reproduce what you're reporting: dl.dropboxusercontent.com/u/59331579/js/simplify.html Commented Mar 11, 2015 at 4:31
  • Yeah I think it was another issue on ym end, thanks Commented Mar 11, 2015 at 14:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.