Measuring widgets unit property

491
1
07-12-2019 07:05 AM
FreddyBroring
New Contributor III

As of the release of the API 4.12 we have a problem with the Measuring tools. When instantiating the tools with the unit property set to "meters" or "square-meters", the tools won't initialize and report the following error:

Cannot read property 'coordsys' of null
at Function.b.DX (geometryEngine.js:1155)
at Function.b.vR (geometryEngine.js:1149)
at g.Ao (geometryEngine.js:1149)
at Function.d._getTransformation (geometryEngine.js:1280)
at p (projection.js:4)
at k (projection.js:4)
at Object.b.project (projection.js:5)
at Object.a._updatePolylines (DistanceMeasurement2DTool.js:14)
at Object.<anonymous> (DistanceMeasurement2DTool.js:6)
at f (dojo.js:386)


This is also the case with other units. Only "metric" works for me (haven't tried imperial).

You can try it in de sample at: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=widgets-measur...

activeWidget = new DistanceMeasurement2D({
view: view,
unit: "meters"
});

doesn't work.

activeWidget = new DistanceMeasurement2D({
view: view,
unit: "metric"
});

works, so I use that now.

Is this a bug introduced in 4.12? In 4.11 we had no problems.

Tags (1)
0 Kudos
1 Reply
BenElan
Esri Contributor

Hi Freddy, 

Thanks for the find. This is an equivalency issue with 4.12. I have submitted a bug for this issue:

BUG-000123678