In the JS API 4.6, when attempting to add a point to the end of a ring or path of a Polygon or Polyline, the insertPoint function seems to do nothing.
graphic.geometry.insertPoint(r,p,point);
In 4.5 this works as expected.
Looking into the source, it seems that the validation is failing when adding points to the and of the point arrays (ring/path). If I override the validation function, it can get past this, but then there are other problems with the graphic not being updated correctly.
Robert,
This sounds like a bug. Have you contacted tech support to see if it is already reported as a bug?
I had not, but now I have! Thanks
rorodrig - may I ask what is the Bug# support gave you?
I noticed the same thing. Heres a link to my post. https://community.esri.com/thread/207422-polyline-methods-bugged-in-46
This is a bug in 4.6. The problem is that, for version 4.6, the insertPoint doesn't work when adding a point at the end of the ring. We plan to fix this for version 4.7. Thank you for reporting.