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
1 Answer 1
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()
-
Thanks John, it will be interesting to explore the new geometry engine in 3.13.Jeremy Hamm– Jeremy Hamm2015年03月09日 15:44:03 +00:00Commented 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?Jeremy Hamm– Jeremy Hamm2015年03月09日 21:23:11 +00:00Commented Mar 9, 2015 at 21:23
-
not sure. i can't reproduce what you're reporting: dl.dropboxusercontent.com/u/59331579/js/simplify.htmljohn gravois– john gravois2015年03月11日 04:31:16 +00:00Commented Mar 11, 2015 at 4:31
-
Yeah I think it was another issue on ym end, thanksJeremy Hamm– Jeremy Hamm2015年03月11日 14:44:03 +00:00Commented Mar 11, 2015 at 14:44