esri.dijit.legend respectCurrentMapScale:true not working

Discussion created by crombezk on Jan 9, 2011
My legend is not respecting the current map scale. My layer and sublayer visibility is set to turn on and off at certain scales in my mxd and msd.

However, when you click on the legend button on my map, it loads the legend for the entire map service at every scale. Am I missing something here?

here is the code for my legend floating window:


function createLegendFloater() {
    if (dijit.byId("float")) { dijit.byId("float").destroyRecursive(); }
    if (dojo.byId("floatDiv")) { dojo.destroy(dojo.byId("floatDiv")); }

    var mainDiv = dojo.create("div", { id: "floatDiv" }, dojo.byId("floatWin"));
    var legendDiv = dojo.create("div", { id: "legendDiv" }, mainDiv);

    var legendBase = new esri.dijit.Legend({
            //layerInfos:[{layer:mapLayer,title:"Base Map Legend"}],
            respectCurrentMapScale: true

    floatPane = new dojox.layout.FloatingPane({
        title: "Legend",
        dockable: false,
        maxable: false,
        closable: true,
        resizable: true,
        id: "float",
        iconClass: "legendIcon"
    }, dojo.byId("floatDiv"));
    floatPane.resize({ w: 350, h: 450 });

here is the link to my development site:

Any help would be appreciated.