encode wmts legend if and only if there is one