To test what i have said, i wrote a piece of code on ESRI BasemapGallery sample. Here is part of it:
var basemaps = [];
basemapLayer = new BasemapLayer({ url: "http://tiles.arcgis.com/tiles/qHLhLQrcvEnxjtPr/arcgis/rest/services/OS_Open_Carto_2/MapServe" });
baseMap = new Basemap({
layers: [basemapLayer],
title: "OS_Open_Carto_2",
thumbnailUrl: "Tulips.jpg"
});
basemaps.push(baseMap);
map = new Map("map", {
basemap: "OS_Open_Carto_2",
//center: [0.1278, 51.5074],
center:[-77.0369,38.9072],
zoom: 15
});
//add the basemap gallery, in this case we'll display maps from ArcGIS.com including bing maps
var basemapGallery = new BasemapGallery({
showArcGISBasemaps: false,
map: map,
basemaps: basemaps
}, "basemapGallery");
basemapGallery.startup();
basemapGallery.on("error", function(msg) {
console.log("basemap gallery error: ", msg);
});
});
The code won't work on the sevices, it thrown this message: "esri.dijit.BasemapGallery: Unable to switch basemap because new basemap is a tiled service and cannot be loaded as a dynamic layer". If i Change url to any map serivce, for example, World_Street_Map (MapServer) , my code will work. So i would l guess the url you list is not work or you list tile info for this searvices or something else. Note that the title of Basemap is the one you should put it map's basemap property. hope this will help you a little bit.