This is supported, and we publish a sample to show how to do it: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/mapconfig_customdojo.htmlThat being said, I haven't tried this with 1.7. Since 1.7 introduces a new loader, there might be issues. I'll try to take a look and see if I can get it to work.Edit: This simple example works with version 2.7 of our API (uses dojo 1.6.1) and dojo 1.7.1 from the Google CDN:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Custom Dojo Namespace</title>
<!-- Load Dojo 1.7.1 from Google CDN -->
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js"></script>
<!-- local version also works... -->
<!-- <script type="text/javascript" src="/~dswingley/dojosrc/1.7.1/dojo/dojo.js" ></script> -->
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.7/js/dojo/dijit/themes/claro/claro.css">
<script type="text/javascript">
djConfig = {
scopeMap: [
[ "dojo", "esriDojo" ],
[ "dijit", "esriDijit" ],
[ "dojox", "esriDojox" ]
]
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.7"></script>
<script type="text/javascript">
// Dojo library from Google CDN is built in such a way that
// it depends on the djConfig global object when loading modules.
// But we override it later when loading the JSAPI.
// Reset it here so that modules from Google CDN are loaded
// properly.
// For example: after the page loads, try loading the following
// module:
// dojo.require("dijit.layout.ContentPane");
// and observe firebug net tab. You should see bunch of modules
// loaded from Google CDN. Without the reset below, the first module
// loaded will be from Google CDN and its dependencies loaded from
// the dojo instance embedded within JSAPI.
djConfig = dojo.config;
esriDojo.require("esri.map");
dojo.require("dijit.layout.ContentPane");
function init() {
var extent = new esri.geometry.Extent(-122.93,47.02,-122.86,47.07, new esri.SpatialReference({wkid:4326}));
var map = new esri.Map("map", {extent:esri.geometry.geographicToWebMercator(extent)});
var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer");
map.addLayer(tiledMapServiceLayer);
esriDojo.connect(map,"onLoad",function(map){
var esriVersion = "<b>ArcGIS API for JavaScript version:</b>" + esri.version;
var esriDojoVersion = "<b>ArcGIS API for JavaScript Dojo version:</b>" + esriDojo.version;
esriDojo.byId('esriInfo').innerHTML= esriVersion + "<br />" + esriDojoVersion;
});
}
function initDojo(){
dojo.byId('dojoInfo').innerHTML="<b>Google CDN Dojo Version:</b>" + dojo.version;
}
dojo.addOnLoad(initDojo);
esriDojo.addOnLoad(init);
</script>
</head>
<body class="claro">
The following libraries are loaded in this application:<br />
<div id="map" style="margin:2px 2px 2px 2px; border:solid thin #999967;width:500px;height:500px;"> </div>
<span id="esriInfo"></span><br />
<span id="dojoInfo"></span>
</div>
</body>
</html>