0

I am attempting to merge the closest facility and driving directions examples together on a website using the arcGIS for javascript (3.17) API. I have successfully implemented the two on the site separately, so I know my URL and developer.arcGIS accounts are set up correctly, but when combined, they throw the following error:

esri.config.defaults.io.proxyUrl is not set

You can see the site (and the code) here: https://mikecp11.github.io/original.html
Any tips on how I can fix this error would be greatly appreciated.

1 Answer 1

0

Try setting the proxyUrl before you start adding the proxy rules.

esriConfig.defaults.io.proxyUrl = "https://mikecp11.github.io/PHP/proxy.php";
3
  • Do I then need to change the task url's? If so do you have an example of what they should be switched to?
    – JColl
    Jul 10, 2016 at 16:43
  • @JColl - No, I don't believe you need to change them.
    – Lambert
    Jul 10, 2016 at 17:57
  • Minor note: github.io does not support hosting PHP etc. You will not be able to run the resource proxies there. Jul 22, 2016 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.