Direction text changing

336
0
09-01-2021 12:49 AM
ADITYAKUMAR1
Occasional Contributor III

Hi,

 I am working on route using arcGIS JavaScript API 3.x. 

I am using the below line of code to get the stops detail ,direction text,time and distance.

array.forEach(routeResult.directions.features, function (feature) {
var direction = feature.attributes;
directions.push(direction);
});
//send stop
array.forEach(routeResult.stops, function (stop) {
finalstops.push(stop.attributes);
});
var evtData = { "directions": directions, "totalDriveTime": ttlDriveTime, "totalTime": ttlTime, "totalLength": ttlLength, "stops": finalstops };
events.fun({ eventData: evtData });
console.log("directions:", evtData);

 

While trying to debug I find the direction details(text ) is displaying as expected.

ADITYAKUMAR1_0-1630482413497.png

But when I try to bind it using event.fun the text value gets changed.

ADITYAKUMAR1_2-1630482483445.png

Any idea why its changing? And what can be done to make it unchanged?

Thanks

Aditya

Tags (1)
0 Kudos
0 Replies