You're correct- I am using LODs to control the visibility of the imagery. Here's the snippet:
var lods = [{
"level" : 0,
"resolution" : 156543.033928,
"scale" : 591657527.591555
}, {
"level" : 1,
"resolution" : 78271.5169639999,
"scale" : 295828763.795777
}, {
etc etc
}, {
"level" : 19,
"resolution" : 0.298582141647617,
"scale" : 1128.497176
}, {
"level" : 20,
"resolution" : 0.1492910708237085,
"scale" : 564.248588125
}];
tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/Worl d_Street_Map/MapServer");
hcBasemap = new esri.layers.ArcGISTiledMapServiceLayer("http://www.blahblahblah.org/ArcGIS10/rest/services/Cache/Cache Aerials2010/MapServer", {
visible : false
});
hcBasemapDynamic = new esri.layers.ArcGISDynamicMapServiceLayer("http://www.blahblahblah.org/ArcGIS10/rest/services/Ca che/CacheAerials2010/MapServer", {
id : "Imagery_Dynamic",
minScale : 564.248588125
});
and the printMap function for good measure:function printMap(label, author, copyright, format, layout, scaleunit) {
var layersToPrint = esri.tasks.LegendLayer();
layersToPrint.layerId = "BlahBlahBlah";
layersToPrint.subLayerIds = [14, 15, 16, 17, 18, 19, 21, 24, 27, 28, 29, 30];
params = new esri.tasks.PrintParameters();
var template = new esri.tasks.PrintTemplate();
template.exportOptions = {
width : 750,
height : 1000,
dpi : 96
};
template.layoutOptions = {
copyrightText : copyright,
scalebarUnit : scaleunit,
titleText : label,
authorText : author,
legendLayers : [layersToPrint]
};
template.format = format;
template.layout = layout;
template.preserveScale = true;
params.template = template;
params.map = map;
showLoader();
printTask.execute(params, function(result) {
hideLoader();
window.open(result.url, '_blank');
window.focus();
});
}