WAB Draw Widget Measure Problem

3787
2
02-17-2015 03:59 PM
TomSellsted
MVP Regular Contributor

I found a minor bug in the draw widget.  When measuring a polygon, extent, triangle, the function performing the perimeter calculation was dropping the last point from the polygon ring.  This was creating an incomplete measurement of every polygon drawn.

The offending line in the _addPolygonMeasure function:

points = points.slice(0, points.length - 1);

I commented out this line and in calculates the perimeter correctly.  I am posting this in hopes that it will fixed in core project.

Regards,

Tom

Tags (2)
0 Kudos
2 Replies
StanMcShinsky
Regular Contributor

Thanks Tom. I was trying to figure out what that number was because it was not matching up with anything.

-Stan

0 Kudos
TomSellsted
MVP Regular Contributor

Stan,

It looks like they still don't have the perimeter measurement correct for triangles, extents and for polygons at WAB 1.1.  The rest of the measurements appear to work properly.

Regards,

Tom