Sample 3D Draw Line/Measure Tool for ArcGIS API for Javascript 4.4

Sample Draw Line / Measure Tool for SceneView in 4.4
DISCLAIMER: the resulting length is only a 2D measurement
Here’s a link to my example:
JS Bin – Collaborative JavaScript Debugging
http://jsbin.com/dixedur/2/edit?html,css,js,output
I threw together a draw-polyline tool that drapes over the world elevation layer in a SceneView and adds a text graphic showing the 2D length of the line upon completion.
This is what I’m using in my app until the API supports a proper 3D measure tool. Just wanted to share it in case someone is trying to incorporate at least some level of measurement functionality in their 3D app.
Credit also goes to the author of this sample:
Draw polygon for spatial query (ArcGIS JS API 4.4)
https://developers.arcgis.com/javascript/latest/sample-code/draw-spatial-query/index.html
I used that as a starting point and only added a few tweaks to make it look good in 3D and to add the measurement functionality.
I also have a polygon version of this tool. If anyone wants to see it, just ask.
Hope this is helpful.
Cheers,
Drew


