Select to view content in your preferred language

Using a Feature Service from ArcGIS Online as a Facility or Incident Closest Facility JavaScript

594
1
03-05-2019 09:17 PM
AdminLCC
New Contributor

I am attempting to use the Closest Facility function in the ArcGIS Javascript API. I need to use a feature service that is hosted in ArcGIS Online as the Facilities layer and then I have search response that I'd like to use as an incident. How can I do this?

I have looked into the Data file option which seems to have worked however the response I get back from the Closest Facility Task function that runs gives me the following response

0 location(s) in \"Facilities\" are valid. Need at least 1 valid location(s). Insufficient number of valid locations in \"Facilities\" or \"Incidents\"."]

Using the same dataset as my facilities layer hitting the Route URL with postman will return a successful response.

1 Reply
DebraHodges
New Contributor

I need an answer to this question as well.

0 Kudos