OpenLayers 2: WMS layer attribution legend doesn't change between WMS layers, it just piles up
This post has NOT been accepted by the mailing list yet.
I'm using [this] to put legends in WMS layers. It works nicely when similar layers have the same legend (eg. layer A1 with legend AAA and layer A2 with legend AAA). The problem is when WMS layers have different legends.
For instance, when two different layers are checked (ie. layer A1 with legend AAA and layer B1 with legend BBB), both legends pile up, so legend AAA is shifted upwards with regard legend BBB.