gws.base.legend.core¶
Base legend object.
Source code: gws.base.legend.core
Module Contents¶
- gws.base.legend.core.combine_outputs(lro_list: list[gws.LegendRenderOutput], options: dict = None) gws.LegendRenderOutput | None¶
Combine several legend outputs into one image.
The images are stacked vertically, aligned to the left. Outputs without an image are skipped.
- Parameters:
lro_list – Legend outputs to combine;
Noneentries are allowed.options – Legend options, currently unused.
- Returns:
A new legend output with the combined image, or
Noneif there are no images.
- class gws.base.legend.core.Config(*args, **kwargs)¶
Bases:
gws.ConfigWithAccessLayer legend confuguration.
- cacheMaxAge: gws.Duration = '1d'¶
How long legend images from remote sources are cached.
- options: dict | None¶
Provider-specific legend options.
- class gws.base.legend.core.Object¶
Bases:
gws.LegendBase legend object.
Reads the common
cacheMaxAgeandoptionssettings. Subclasses implementrenderand can stack several legend images into one withcombine_outputs.- options: dict¶
Provider-specific legend options.
- configure()¶
Configuration hook.
Called when the node is initialized. Raising an exception here aborts the creation of the node.