Enhanced Draw Widget

2093
3
02-04-2020 03:11 AM
MarkCooper5
Occasional Contributor II

Hi

I am using the enhanced draw widget (https://community.esri.com/docs/DOC-3256) for an app in WAB developer and it is brilliant. However, I am slightly confused with some of the measurements. For example, when I draw a square which is 1km by 1km, the area shows are 1 square km as I would expect, but the length comes out at 3km. Is the lenth measurement not the perimeter of the shape?

Many thanks

Tags (2)
0 Kudos
3 Replies
Nadia
by
New Contributor

Hi, I experience the same thing. The Enhanced widget is incorrect in measuring both distance an area. For example: below the upper line is showing 1.3 km, the lower line, created by using the inbuilt ESRI draw widget shows 1 km. Not sure where to correct the code to fix it, because the enhanced widget is so much better that Esri's in built one. Please update this thread if you found a solution. Thanks.

 

Nadia_0-1643142169742.png

 

0 Kudos
Kara_Lara
New Contributor III

They say they've addressed this in the Dec 2, 2020 release found here: https://github.com/magis-nc/esri-webappbuilder-widget-eDraw I haven't tried it yet, however.

I'm hoping this is the latest release. Please let me know if anyone has seen anything more recent. Thank you! And I hope this helps!

0 Kudos
JenaF
by
New Contributor II

I didn't see a Dec 2020 release, but figured out how to fix it in the 2.8.1 May 8, 2018 release. On lines 1496, 1498, and 1500 of the Widget.js file, change "3857" to "102100". It's a complication from the duplicate wkids for Web Mercator. The "4326" values could stay as they are. I am on Enterprise 10.8.1, Launchpad theme, widget used in anchor bar at bottom of screen, added as a custom widget to WAB.

0 Kudos