new Attribution(opt_options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Attribution options.
|
Fires:
-
change
(module:ol/events/Event~Event) - Generic change event. Triggered when the revision counter is increased. -
propertychange
(module:ol/Object.ObjectEvent) - Triggered when a property is changed.
Extends
Methods
-
getCollapsed(){boolean}
control/Attribution.js, line 320 -
Return
true
when the attribution is currently collapsed orfalse
otherwise.Returns:
True if the widget is collapsed.
-
getCollapsible(){boolean}
control/Attribution.js, line 280 -
Return
true
if the attribution is collapsible,false
otherwise.Returns:
True if the widget is collapsible.
-
Get the map associated with this control.
Returns:
Map.
-
setCollapsed(collapsed)
control/Attribution.js, line 307 -
Collapse or expand the attribution according to the passed parameter. Will not do anything if the attribution isn't collapsible or if the current collapsed state is already the one requested.
Name Type Description collapsed
boolean True if the widget is collapsed.
-
setCollapsible(collapsible)
control/Attribution.js, line 289 -
Set whether the attribution should be collapsible.
Name Type Description collapsible
boolean True if the widget is collapsible.
-
Remove the control from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.
Name Type Description map
module:ol/PluggableMap~PluggableMap Map.
-
This function is used to set a target element for the control. It has no effect if it is called after the control has been added to the map (i.e. after
setMap
is called on the control). If notarget
is set in the options passed to the control constructor and ifsetTarget
is not called then the control is added to the map's overlay container.Name Type Description target
HTMLElement | string Target.