Select to view content in your preferred language

ArcGIS API Locally installed

473
2
06-08-2012 10:37 AM
demdeberanz
Emerging Contributor
Hi everybody,
   I successfully installed the API locally on a server called A. I use them in a web page that resides on another server called B.
When I open that webpage I get the following error:

...Could not load cross-domain resources...

What's the problem? I supposed the CORS shuldn't be a problem, since usually the APIs used for the ESRI demos are hosted on a different server from the one on that the demo page (that uses them) resides.

Thank you very much.
0 Kudos
2 Replies
HemingZhu
Frequent Contributor
Hi everybody,
   I successfully installed the API locally on a server called A. I use them in a web page that resides on another server called B.
When I open that webpage I get the following error:

...Could not load cross-domain resources...

What's the problem? I supposed the CORS shuldn't be a problem, since usually the APIs used for the ESRI demos are hosted on a different server from the one on that the demo page (that uses them) resides.

Thank you very much.


The issue most likely is you src not pointing to the right place (for example: <script type="text/javascript" src="http://yourwebsit/arcgis_js_api/library/2.8/jsapi/"></script>). Tried to click the src link. If the src is right, a file download window should popup to prompt you open or save jsapi.js file. OR if you local api has different domain from your app. Then dojo.require (esri.xxx...) will cause the above error
0 Kudos
demdeberanz
Emerging Contributor
The issue most likely is you src not pointing to the right place (for example: <script type="text/javascript" src="http://yourwebsit/arcgis_js_api/library/2.8/jsapi/"></script>). Tried to click the src link. If the src is right, a file download window should popup to prompt you open or save jsapi.js file. OR if you local api has different domain from your app. Then dojo.require (esri.xxx...) will cause the above error


Hi huzu,
  thank you very much for your reply. I'm in the latter situation

if you local api has different domain from your app. Then dojo.require (esri.xxx...) will cause the above error


How can I fix it?

Thank you very much again.
0 Kudos