//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); });
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.