Switching layers when zoomed in

Discussion created by jaybee18 on Mar 4, 2011
Latest reply on Mar 4, 2011 by hzhu
Hi, my mapservice has two layers and I want each to display at different extents. I can see that I can specify this in the map constructor:

var lods = [
          {"level" : 1, "resolution" : 0.010986328125, "scale" : 4617149.97766929},
          {"level" : 2, "resolution" : 0.0054931640625, "scale" : 2308574.98883465} 
map = new esri.Map("map", { extent: startExtent, lods: lods });

I think I've got the wrong end of the stick here though -- that sets the lods for the map, right? How do I say which layer should be shown at a certain lod?

Thanks in advance,