Module: ol/control/Attribution

ol/control/Attribution


Classes

Attribution

Type Definitions

Options{Object}

Properties:
Name Type Description
className string
(defaults to 'ol-attribution')

CSS class name.

target HTMLElement | string | undefined

Specify a target if you want the control to be rendered outside of the map's viewport.

collapsible boolean | undefined

Specify if attributions can be collapsed. If not specified, sources control this behavior with their attributionsCollapsible setting.

collapsed boolean
(defaults to true)

Specify if attributions should be collapsed at startup.

tipLabel string
(defaults to 'Attributions')

Text label to use for the button tip.

label string | HTMLElement
(defaults to 'i')

Text label to use for the collapsed attributions button. Instead of text, also an element (e.g. a span element) can be used.

expandClassName string
(defaults to className + '-expand')

CSS class name for the collapsed attributions button.

collapseLabel string | HTMLElement
(defaults to '›')

Text label to use for the expanded attributions button. Instead of text, also an element (e.g. a span element) can be used.

collapseClassName string
(defaults to className + '-collapse')

CSS class name for the expanded attributions button.

render function | undefined

Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.

attributions string | Array.<string> | undefined

Optional attribution(s) that will always be displayed regardless of the layers rendered