AnsweredAssumed Answered

Converting coordinates to route params

Question asked by efranklingis on Jun 11, 2018
Latest reply on Jun 12, 2018 by rscheitlin

How can i convert coordinates to routeparam compatible stops in order to carry out a RouteTask?

These coordinates are coming from the browser geolocation. Currently when i click on a point and then use the geolocation from the browser I get an error from attempting to solve the route, however when i click on 2 separate points the route solves successfully.

 

let stop = new Graphic({
geometry: new Point(position.coords.longitude,position.coords.latitude),
symbol: stopSymbol
});
routeParams.stops.features.push(stop);   

Outcomes