Select to view content in your preferred language

Basemap Gallery errors?

962
3
10-01-2013 01:07 PM
JessicaKnight1
Occasional Contributor
I have tried to add in the basemap gallery and get this error when I add in the code:
"Error: Permission denied for <file://> to create wrapper for object of class UnnamedClass" No errors if this code is commented out. Any thoughts?
0 Kudos
3 Replies
KenBuja
MVP Esteemed Contributor
Can you post the code that you're using?
0 Kudos
JessicaKnight1
Occasional Contributor
Using this example: https://developers.arcgis.com/en/javascript/jssamples/widget_basemap.html

I get the error when this section of code is active:
 //add basemap gallery
   var basemapGallery = new esri.dijit.BasemapGallery ({
    showArcGISBasemaps: true,
    map: map
   },  "basemapGallery");
   basemapGallery.startup();
   
   basemapGallery.on("error", function(msg) {
    console.log("Basemap Gallery Error: ", msg);
   });
0 Kudos
KenBuja
MVP Esteemed Contributor
Take a look at this page on setting up a development environment.

When developing with the ArcGIS API for JavaScript, a web server is  required. This means that web pages and apps using the ArcGIS API for  JavaScript need to be accessed over http://  (or https://) rather than file://. To meet this requirement, install  and configure a web server. Web server software is available free of  charge for all operating systems.
0 Kudos