When calling the planner as follows:
let from = { latitude: 51.054556,
longitude: 3.725333,
name: 'A' };
let to = { latitude: 51.04892,
longitude: 3.728874,
name: 'B' };
planner.query({
from, to
})
.take(3)
.on('end', () => {
console.log(from)
});
the id attribute of fromand to will be changed to for example "Departure Point" which is undesireable behavior and will cause problems when using const. Better to make a copy of these ILocation objects in the planner.