I seem to be unable to use the RouteLayer/Directions to add the Directions widget to an existing project.
Even the example https://developers.arcgis.com/javascript/latest/sample-code/widgets-directions/ here doesn't work, I get the same message "Cannot load route service. This may be due to the service not being accessible."
Looking at the service status no outages reported with this service.
Using this example to add Directions widget to my project.
https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html
As long as you have Routing and probably geocoding enabled for your key, should be fine.
That was it. I did not realize that these were not enabled by default, had to go in and turn them on for that API key.
Ok, I copied the code from the sandbox and added my API key but I'm seeing the same error (attached)
Is there something I need to turn on for my account to be able to use the route service?
Odd, I could have sworn I was, but I was using the "View Live" button, not sandbox. Thanks lol it's been a long day...
The sample works in the sandbox.
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-directions
Are you opening the codepen link? If so, the Route service requires an API Key, so you need to provide a key in your own app.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.