Hi devs (Andrea ;)

since http://trac.geoext.org/ticket/153 we can set default options by
using Ext's default mechanism.
So we can use something like:

defaults: {
        imageFormat: 'image/png'
}

But except those standard getLegendGraphic parameters, Geoserver (and
probably other wms servers) have other useful vendor options to
control legend graphics appearance.
One of them is controlling to show or to hide legend title, which is
by default turned off (if thers one rule visible)

http://geoserver.org/display/GEOSDOC/GetLegendGraphic+Improvements says:
Support for another key in the LEGEND_OPTIONS parameter would allow
legend labels to be forced on or off. Currently the following logic is
implemented:
    * If there's just one Rule for a legend, no label is supplied
    * If there is more than one Rule for a legend, labels are supplied


I allready created patch for widget\WMSLegend.js where I added
LEGEND_OPTIONS  parameter, but as other WMS server maybe have other
vendor parameter names, im in favour of creating one unique parameter,
similar to this:

defaults: {
        imageFormat: 'image/png',
        vendorParameters: {
            legendOptions: 'forceLabels:on'
        }
 }

Please let me know what do you think so I can open a ticket for it.

Regards,


-- 
Ivan Grcic
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to