AnsweredAssumed Answered

Polygon and Polyline insertPoint function seems to be broken in JS API 4.6 but was working in 4.5.

Question asked by rorodrig on Feb 12, 2018
Latest reply on Mar 2, 2018 by bsvensson-esristaff

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.

Outcomes