JS 4.6 - geometryEngine.geodesicLength. Is this bug?

03-23-2018 05:44 AM
Occasional Contributor

Hello. I'm working on a create measuring geaodesic area and length.

I have no any problem with calculate geodesicarea. But im getting below error message when i send a lineGraphic and unittype to geodesiclength.

Notice: myLineGraphic has no problem because i can see line graphic on map

var myLength = geometryEngine.geodesicLength(myLinegraphic, "kilometers");

Error Message: 

Uncaught type error: d.getcacheValue is not a function (geometryengine.js:11);

Am i doing wrong something or is this a bug?.

Thanks inadvance

0 Kudos
3 Replies
MVP Honored Contributor

That function works properly in the geometryEngine sample GeometryEngine - geodesic buffers | ArcGIS API for JavaScript 4.6 

Occasional Contributor

Thanks for sample.

Can you add a sample for length (kilometers) for linegraphic please?

i'm drawing line graphic by mouse.

Is my code wrong? I just send a linegraphic and "kilometers" parameters.

0 Kudos
Occasional Contributor

ok. i found solution. This is works. send graphics.geometry instead of graphic.


0 Kudos