Skip to content Skip to sidebar Skip to footer

Cannot Create Route From One Point To Another Arcgis Android

I've been trying very hard to create a route between two points(startPoint, endPoint). But i am getting the following error: Location 'Location 1' in 'Stops' is unlocated. Location

Solution 1:

Your X and Y values are switched. Change to this:

PointstartPoint=newPoint(-119.866896, 36.793653);
PointstopPoint=newPoint(-119.853345, 36.795488);

See the Point class documentation to learn that the constructor parameters are (x, y), not (y, x). The route service you're using has a default spatial reference of 4326, which is unprojected longitude and latitude. -119.866896 and -119.853345 are not valid latitude (y) values, but they are valid longitude (x) values.

Post a Comment for "Cannot Create Route From One Point To Another Arcgis Android"