1.2.1 • Published 1 year ago

@polar/plugin-attributions v1.2.1

Weekly downloads
-
License
EUPL-1.2
Repository
github
Last release
1 year ago

Attributions

Scope

This plugin shows attributions (that is, legal information) regarding copyrights and sources of the currently visible layers.

Extension ideas

  • Offer a mode where attributions are always visible. (Not on roadmap.)

Configuration

attributions

All parameters are optional. However, setting neither layerAttributions nor staticAttributions results in an empty window.

fieldNametypedescription
layerAttributionslayerAttribution[]?List of attributions that are shown when the matching layer is visible.
staticAttributionsstring[]?List of static attributions that are always shown.
renderType'iconMenu' | 'independent'?Whether this plugin ('independent') or the IconMenu should handle opening the information box. Defaults to 'independent'.
listenToChangesstring[]?Store variable paths to listen to for changes. Will update the currently visible layers depending on the current map state on changes to these values. Please mind that, when referencing another plugin, that plugin must be in addPlugins before this one.
initiallyOpenboolean?Whether the information box is open by default. Only usable when renderType is set to 'independent', otherwise the IconMenu handles this.
windowWidthnumber?If renderType is set to independent, sets the width of the container of the attributions. Defaults to 500.

attributions.layerAttribution

fieldNametypedescription
idstringID of service the attribution relates to. The text will only be shown when the layer is visible.
titlestringAttribution text or localization key. May contain HTML. The tags <YEAR> and <MONTH> are translated to the current year or month respectively.
1.2.1

1 year ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago