Class representing an encoder for creating a legend in the MFP (MapFishPrint) format. Iterates on the layer tree layers to collect layers in the right order and with all metadata.
Protected
Optional
Add a classItem to a classes array if the classItem to add is not null. If the classItem have embedded classes, these classes must have classItem. Otherwise, the given classItem will be not added.
The encoded legend class for the layer group.
Encodes the legend classes for a given layer, based on its type or className.
The encoded legend classes for the layer, or null if the layer is not supported.
Encodes the legends of every given base layers (recursively).
The encoded legends as an array of MFPLegendClass objects.
The encoded legend classes for a WMS layer, or null if the layer is not visible or inactive.
The encoded legend classes for a given WMTS layer, or null if the layer is not visible or inactive.
Encodes the legend based on the provided options.
The encoded legend or null if no legend classes were found.
a MFPLegendClass object representing the legend class for a WMS layer name.
Retrieves the metadata legend image or hiDPILegendImages for the given layer.
The metadata legend image URL and DPI, or null if not found.
Determines whether the label for a specific server type must be hidden.
True if the label must be hidden, false otherwise.
Sets the options for encoding legend.
If a Legend item have only one child and the child name is identical to its name, then return only the children (cut one level). Shrink also if both names are null or undefined. Otherwise, return the given legend item.
The same legend item or a shrunk one.