Select to view content in your preferred language

Consuming Routing Functionality of ArcGIS Indoor in Custom Web Application

501
3
Jump to solution
11-30-2023 04:22 AM
jauhari_mani
Occasional Contributor

Hi,

I have created and deployed an indoor WebMap on ArcGIS Online. The routing functionality of this WebMap works fine on the Indoor Viewer. However, I want to use this in a custom JS application where the indoor map is utilized using the WebMap Class of the ArcGIS JS SDK, but I am unable to enable routing in it.

Any leads on how I can achieve this?

Regards,
Mani Jauhari

0 Kudos
1 Solution

Accepted Solutions
JasonHineEsri
New Contributor III

Hi Mani!

To enable routing in a custom JS app, you can use the Route class. There is a sample showing how to implement the class, use it to solve routes, and display the routes on a map. If desired, you can also use the Directions widget to allow users to enter start and end locations and receive turn-by-turn directions. In any case, the app will need access to the published route service.

 

View solution in original post

0 Kudos
3 Replies
JasonHineEsri
New Contributor III

Hi Mani!

To enable routing in a custom JS app, you can use the Route class. There is a sample showing how to implement the class, use it to solve routes, and display the routes on a map. If desired, you can also use the Directions widget to allow users to enter start and end locations and receive turn-by-turn directions. In any case, the app will need access to the published route service.

 

0 Kudos
jauhari_mani
Occasional Contributor

Hello @JasonHineEsri

I found the Route Class useful in leveraging my network layer. However, I'm facing an issue with the indoor web map, as it includes a z-index for stops that I'm struggling to capture. The floor filter only allows us to view different layers but doesn't provide the necessary information about the z-index. This information is crucial for the payload of stops to generate a route. Can you provide any suggestions or references to help me achieve routing in an Indoor Map application?

0 Kudos
JasonHineEsri
New Contributor III

Hi @jauhari_mani 

You are correct that the FloorFilter widget does not return z-values (elevation). What you can do is use the information from the FloorFilter to make a Query to get the Levels feature, and extract the z-value from the Levels feature. You can then use that z-value when creating the Stops features, so the Stops are positioned on the correct floor. 

0 Kudos