Gets the legend items for a specific layer.
The map identifier
The layer path to look up
The layer legend items, defaults to undefined
Gets the legend items for a specific layer.