Is it possible to make the above legend/TOC work with a map that is using JSAPI 3.3? I have everything else I need working but it uses the JSAPI 3.3.
Thanks,
Court
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/soria/soria.css"/>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/grid/resources/Grid.css">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/grid/resources/SoriaGrid.css">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/layout/resources/FloatingPane.css"/>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/layout/resources/ResizeHandle.css"/>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css" />
<link rel="stylesheet" href="css/defaultStyle.css"/>
<script>
var dojoConfig = {
parseOnLoad: true,
packages: [
{ "name": "agsjs",
"location": location.pathname.replace(/\/[^/]+$/, "")+'/lib/agsjs/Build_2_04'
}]
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3"></script>
//changes to the djC
var dojoConfig = {
parseOnLoad: true,
packages: [{
"name": "agsjs",
"location": 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/2.04/xbuild/agsjs'
}]
};
//add the require statements in the section of the JS script/file
dojo.require("dojo.fx");
dojo.require("agsjs.dijit.TOC");
//create code to set up your legenLayerInfos
//..this part is up to you on how you do this
var layerInfos = [];
//TODO: you need to add an array that looks something like this .. note this is only an example of one layerInfo object that the legend expects
var layerInfo = {
"layer": fcMapLayer.layerObject,
"title": mapLayer.title,
"defaultSymbol": false
};
layerInfos.push(layerInfo);
//create the legend object
var legendDijit = new agsjs.dijit.TOC({//NL: new esri.dijit.Legend({
map: map,
layerInfos: layerInfo
}, dojo.create('div'));