Select to view content in your preferred language

Cross domain error when loading basemap?

998
4
08-13-2013 01:22 PM
KennethRichards
Occasional Contributor
I get the following error in my console when I first load my code. I think it is a cross domain error. I have never had one of these before so I have no idea where to begin.

XMLHttpRequest cannot load http://services.arcgisonline.com/ArcGIS/rest/info?f=json. Origin null is not allowed by Access-Control-Allow-Origin.
Resource interpreted as Script but transferred with MIME type text/plain: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=json&callback=dojo....".

I am pulling data into my page using DynamicMapServiceLayer for extra basemap data like townships and sections. I am also using FeatureLayer to pull in the data that I am running my queries and other tasks on.

I also don't have much access to my server to make any changes.

[ATTACH=CONFIG]26679[/ATTACH]

Any ideas on how to correct this error?
0 Kudos
4 Replies
JohnGravois
Deactivated User
you're not actually having trouble loading tiles from the public server, correct?

check out this forum thread for more info.
0 Kudos
KennethRichards
Occasional Contributor
Nope, everything displays just fine for me. I just get this error in my console whenever I load the page. It happens when I am running locally or on the server.
0 Kudos
JohnGravois
Deactivated User
cool.  feel free to check out the forum thread i linked to before in order to learn more about this innocuous error.
0 Kudos
JessicaKnight1
Occasional Contributor
I'm getting the XMLHttpRequest error in Safari and Chrome. Its the only error message I get and the ToC doesn't work. Could they be connected? I'm using the ToC widget: http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109

I am also getting errors for the basemap gallery but I'll start a new thread on that.
0 Kudos