Ok this issue looks like a bug but you can workaround it by adding the following before creating the basemap galleryesri.dijit.BasemapGallery.prototype._markSelected = function (basemap) {
if (basemap) {
// unselect all basemap gallery items
dojo.forEach(dojo.query(".esriBasemapGallerySelectedNode",
this.domNode), function (node) {
dojo.removeClass(node, "esriBasemapGallerySelectedNode");
});
// select current basemap gallery item
var basemapNode = dojo.byId("galleryNode_" + basemap.id);
if (basemapNode) {
dojo.addClass(basemapNode, "esriBasemapGallerySelectedNode");
}
}
}
Kelly,
the CORS issue I am fine with ignoring, the fact that the sample code for creating a basemap gallery breaks is not related to CORS. The link to the sample is here http://help.arcgis.com/en/webapi/javascript/arcgis/demos/widget/widget_basemapManual.html
on line 83
var basemapGallery = new esri.dijit.BasemapGallery({
showArcGISBasemaps:false,
basemaps:basemaps,
map:map
},"basemapGallery");
basemapGallery.startup();
that call causes an uncaught error: "Uncaught TypeError: Cannot read property 'className' of null "
this is the issue that still exists and cannot be ignored.