Select to view content in your preferred language

Draw route between two points

824
1
02-27-2021 03:52 AM
RahulFernando
New Contributor

Hello, I need to draw route between two points. I have tested San Diego example that document showed. Now I need to use in my area Sri Lanka. When I used I got check getCause(). How do I use routing feature in my area Sri Lanka. I saw some configuration in example like:

<string name="navigation_vector">https://www.arcgis.com/sharing/rest/content/items/dcbbba0edf094eaa81af19298b9c6247/resources/styles/root.json</string>
<string name="routing_service">https://sampleserver6.arcgisonline.com/arcgis/rest/services/NetworkAnalysis/SanDiego/NAServer/Route</string>

 

0 Kudos
1 Reply
MarkBaird
Esri Regular Contributor

The sample code uses a dataset which I believe only covers the San Diego area.  It's a demo service and not designed for production use.  If you want to perform routing operations in other areas you will need to use a different service.  

You have a couple of options here, you can either make your own data, or you can use one of the services we host.  There is lots of information about it here:

https://developers.arcgis.com/android/route-and-directions/

Does this help?

0 Kudos