<!--Start All Div Tags in Left Pane for Accordion Container-->
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'left'" id="leftPane">
<div data-dojo-type="dijit.layout.AccordionContainer">
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="title:'Legend'">
Political Boundaries
<!--add legend here-->
<div data-dojo-type="dijit.layout.ContentPane" id="legendPane"
data-dojo-props="title:'Legend', selected:true">
<!--<div id="legendDiv"></div>-->
<div id="tocDiv">
</div>
</div>
<!--end adding legend here-->
<!--start adding print button here-->
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="title:'Print'">
<div id="printButton">
</div>
</div>
<!--end print button here-->
<!--start bookmark here-->
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="title:'Bookmark'">
<div id="bookmark"></div>
</div>
</div>
</div>
</div>
<!--end bookmark here-->
<!--End all Div Tags in Left Pane for Accordion Container-->
//add the legend
dojo.connect(map, 'onLayersAddResult', function (results) {
var toc = new agsjs.dijit.TOC({
map: map,
layerInfos: [{
layer: dynaLayer1,
title: "Political Boundaries",
noLegend:false,
noLayers: false
}
]
}
, 'tocDiv');
toc.startup();
console.log("Set TOC");
}
);
//map.addLayers([citycouncildistricts, countycommissionerprecincts, justiceofthepeaceprecincts, texashouseofrepresentativesdistricts]);
map.addLayers([dynaLayer1]);
dojo.connect(map, 'onLoad', function (theMap) {
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
//"end legend"
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="title:'Legend'">
Political Boundaries
</div>