Adapt legendformatter for river 1.6.0.
Adapt legendformatter for river 1.6.0.