Select to view content in your preferred language

JS 4.6 - geometryEngine.geodesicLength. Is this bug?

1254
3
03-23-2018 05:44 AM
TubaKumbara
Regular 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
KenBuja
MVP Esteemed Contributor

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

TubaKumbara
Regular 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
TubaKumbara
Regular Contributor

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

Thanks.

0 Kudos