Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Description classNamestring
(defaults to 'ol-attribution')CSS class name.
targetHTMLElement | string | undefined Specify a target if you want the control to be rendered outside of the map's viewport.
collapsibleboolean | undefined Specify if attributions can be collapsed. If not specified, sources control this behavior with their
attributionsCollapsiblesetting.collapsedboolean
(defaults to true)Specify if attributions should be collapsed at startup.
tipLabelstring
(defaults to 'Attributions')Text label to use for the button tip.
labelstring | HTMLElement
(defaults to 'i')Text label to use for the collapsed attributions button. Instead of text, also an element (e.g. a
spanelement) can be used.expandClassNamestring
(defaults to className + '-expand')CSS class name for the collapsed attributions button.
collapseLabelstring | HTMLElement
(defaults to '›')Text label to use for the expanded attributions button. Instead of text, also an element (e.g. a
spanelement) can be used.collapseClassNamestring
(defaults to className + '-collapse')CSS class name for the expanded attributions button.
renderfunction | undefined Function called when the control should be re-rendered. This is called in a
requestAnimationFramecallback.attributionsstring | Array.<string> | undefined Optional attribution(s) that will always be displayed regardless of the layers rendered