Select to view content in your preferred language

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

4083
5
02-12-2018 01:17 AM
RobertRodrigues
New Contributor

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.

Tags (2)
0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Robert,

   This sounds like a bug. Have you contacted tech support to see if it is already reported as a bug?

0 Kudos
RobertRodrigues
New Contributor

I had not, but now I have! Thanks

BjornSvensson
Esri Regular Contributor

rorodrig‌ - may I ask what is the Bug# support gave you?

0 Kudos
AndrewLindley
Regular Contributor

I noticed the same thing. Heres a link to my post. https://community.esri.com/thread/207422-polyline-methods-bugged-in-46 

0 Kudos
BjornSvensson
Esri Regular Contributor

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.