Cannot create route from one point to another ArcGIS Android

2784
2
Jump to solution
01-29-2016 08:54 PM
ImranHakeem
New Contributor

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 "Location 2" in "Stops" is unlocated. Need at least 2 valid stops. "Stops" does not contain valid input for any route.

My code can be found in this link: http://paste.ubuntu.com/14728671/

I've searched the internet. Many developers were/are facing this problem. I've tried all the solutions but none of them worked. I got routeTaskURL from the ArcGIS Routing Sample app. The link which is given in the documentation of ArcGIS maps gives me the 403 error if i open it in the browser.

Note: "token" and "clientID" is declared in the first step and they both are taken from the ArcGIS developers console where i registered my application.

Any Suggestions?

0 Kudos
1 Solution

Accepted Solutions
AlexanderNohe1
Occasional Contributor III

I think your coordinates are backwards.

Point(36.793653, -119.866896)

should be Point(x, y)

If you are working in WGS 84 (4326) the maximum value for Y is 90/-90.

I believe what you meant to put was:

Point(-119.866896, 36.793653)

If you add the stop graphics to your map, do they show in the correct location?

View solution in original post

0 Kudos
2 Replies
AlexanderNohe1
Occasional Contributor III

I think your coordinates are backwards.

Point(36.793653, -119.866896)

should be Point(x, y)

If you are working in WGS 84 (4326) the maximum value for Y is 90/-90.

I believe what you meant to put was:

Point(-119.866896, 36.793653)

If you add the stop graphics to your map, do they show in the correct location?

0 Kudos
ImranHakeem
New Contributor

Thanks, i forgot to post my solution here as i posted my problem on 3 different forums and someone solved my problem.

Yes, my x and y values were switched

Thanks!

0 Kudos