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.
It seems to me that the issue is around line 103 of the OpenLayers.Control.Attribution code: https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Control/Attribution.js, is that right? I'm not sure how to modify the original code to avoid that behavior, and much better, modify it to only display the legend of last checked/clicked WMS layer.
Thanks for any pointers,
أكثر...
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.
It seems to me that the issue is around line 103 of the OpenLayers.Control.Attribution code: https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Control/Attribution.js, is that right? I'm not sure how to modify the original code to avoid that behavior, and much better, modify it to only display the legend of last checked/clicked WMS layer.
Thanks for any pointers,
أكثر...