Hi devs, following examples/legendpanel.html one can see that its possible to make legend for the layers group that contain several layers.
Elements get stacked horizontally next to each other. That looks ok if
we have only one class (rule) per layer, but if we have several then
layer legend get little bit messy.
Here is example, just add one more layer in Cities and Roads layer
inside legendpanel.js example. The result is in attachment.
It would be good to make option to let user define align method -
vertical/horizontal.
As i can see, images are being added in update method or
WMSLegend.js, line 210:
for(i = 0, len = layerNames.length; i<len; i++) {
layerName = layerNames[i];
if(!this.items || !this.getComponent(layerName)) {
this.add({
xtype: "gx_legendimage",
url: this.getLegendUrl(layerName, layerNames),
itemId: layerName
});
}
}
Would it make sense to change layout of the component? To lets say
VBOX or HBOX layout so user can choose which one it wants?
Regards,
Ivan
<<attachment: wms_layergroup_legend.jpg>>
_______________________________________________ Dev mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/dev
