Opened 17 years ago

Closed 16 years ago

#39 closed defect (fixed)

Legend layer control does not work on Mapserver layers with status DEFAULT

Reported by: wbronsema Owned by: pdeschamps
Priority: P2 Milestone: Future
Component: MapServer Version: 1.0.4
Severity: Minor Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

If a mapserver layer has a layer status of DEFAULT it does not respond to the legend layer control

Change History (4)

comment:1 by pagameba, 17 years ago

That is correct, layers with status DEFAULT cannot be turned off through the CGI url. We can do several things:

  • in LoadMap.php, if status is DEFAULT, change it to ON
  • return the status from LoadMap.php and use that to disable the checkbox in the legend - it would be checked on and not changeable.

comment:2 by madair, 16 years ago

Milestone: Future

comment:3 by pdeschamps, 16 years ago

Owner: changed from madair to pdeschamps

i am going to take on this one

comment:4 by pdeschamps, 16 years ago

Resolution: fixed
Status: newclosed

added flag in LoadMap.php "$layerObj->statusdefault" passed it into layer.js .statusDefault and thus added to the legend.js widget in the renderItemCheckBox func.

if(this.options.statusIsDefault){
            this.checkBox.checked = true;
            this.checkBox.disabled = true;
            this.checkBox.readOnly = true;
        }

Now the item appears checked and it is "disabled" (greyed out)

Note: See TracTickets for help on using tickets.