Hi

I want to make turn by turn navigation just like in this example:

https://github.com/Esri/arcgis-runtime-demos-dotnet/tree/master/src/TurnByTurn

`property DirectionManeuverListModel directionListModel:null`

property DirectionManeuver tmp_maneuver

function checkCurrSegment() {

if(directionListModel !== null) {

console.log("checkCurrSegment directionListModel NOT null");

for(var i=0;i<directionListModel.count;i++) {

tmp_maneuver=directionListModel.get(i);

proximity=GeometryEngine.nearestCoordinate(tmp_maneuver.geometry,currPoint);

console.log("checkCurrSegment i:"+i+" distance:"+proximity)

}

}

}

In the example above I got results null.

`qml: checkCurrSegment directionListModel NOT null`

qml: checkCurrSegment i:0 distance:null

qml: checkCurrSegment i:1 distance:null

qml: checkCurrSegment i:2 distance:null

qml: checkCurrSegment i:3 distance:null

qml: checkCurrSegment i:4 distance:null

qml: checkCurrSegment i:5 distance:null

qml: checkCurrSegment i:6 distance:null

qml: checkCurrSegment i:7 distance:null

qml: checkCurrSegment i:8 distance:null

qml: checkCurrSegment i:9 distance:null

also when I try to use other functions from GeometryEngine like

GeometryEngine.distance(tmp_maneuver.geometry,currPoint)

There is always null, or NAN

But the directions have their geometries, eg.

`console.log("checkCurrSegment i:"+i+" geometry:"+tmp_maneuver.geometry)`

qml: checkCurrSegment directionListModel NOT null

qml: checkCurrSegment i:0 geometry:QmlPoint(0x55a3f3556d60)

qml: checkCurrSegment i:1 geometry:QmlPolyline(0x55a3f364f210)

qml: checkCurrSegment i:2 geometry:QmlPolyline(0x55a3f36582c0)

qml: checkCurrSegment i:3 geometry:QmlPolyline(0x55a3f364e640)

qml: checkCurrSegment i:4 geometry:QmlPolyline(0x55a3f2d72700)

qml: checkCurrSegment i:5 geometry:QmlPolyline(0x55a3f3646fe0)

qml: checkCurrSegment i:6 geometry:QmlPolyline(0x55a3f366d990)

qml: checkCurrSegment i:7 geometry:QmlPolyline(0x55a3f36ab800)

qml: checkCurrSegment i:8 geometry:QmlPolyline(0x55a3f34d0f70)

qml: checkCurrSegment i:9 geometry:QmlPoint(0x55a3f34d2000)

I have currPoint with a marker on map and a few destination points, so coordinates works fine.

Can someone give me a hint, whats wrong?

Best Regards

Marek

It would have saved me a lot of time had there been an information that before using GeometryEngine check if both geometries have the same SpatialReference, otherwise GeometryEngine simply doesn't work