add ability to provide custom legendLayers