This could be a static `baseLegend` function (in accordance with my other comments on the layers encoders)