fix warnings
WMS: improve support for legend graphics