Geoportal Extension for Itowns API Reference

Class: Attributions

itowns.control.Attributions

Control to manage layers attributions

new Attributions(aOptions)

Itowns/Controls/Attributions.js, line 31
Name Type Description
aOptions Object

control options

Name Type Description
options Object optional

Itowns.control.Control options

Name Type Default Description
collapsed Boolean false optional

Specify if the control has to be opened or not.

Fires:
Example
var attribution = new itowns.control.Attritbution({
 options : {
     collapsed: true
 }
});
// listeners for attributions update :
attribution.addEventListener("attributions:update", function (e) {...});

Extends

Methods

getCollapsed(){Boolean}

Itowns/Controls/Attributions.js, line 138

Returns true if widget is collapsed (minimize), false otherwise

inherited getElement(){HTMLElement}

Itowns/Controls/Widget.js, line 55

Return the widget's container element.

Returns:
container element.

inherited getGlobe(){Object}

Itowns/Controls/Widget.js, line 115

Get the globe associated with the widget. Undefined if the widget is not added to a globe.

inherited getOptions(){Object}

Itowns/Controls/Widget.js, line 135

Get the options associated with the widget.

inherited getPosition(){String}

Itowns/Controls/Widget.js, line 105

Return the widget's element position.

Returns:
element position.

inherited getTarget(){HTMLElement}

Itowns/Controls/Widget.js, line 85

Return the widget's target div.

Returns:
target div.

setCollapsed(collapsed)

Itowns/Controls/Attributions.js, line 120

Collapse or display control main container

Name Type Description
collapsed Boolean

True to collapse control, False to display it

setGlobe(globe)

Itowns/Controls/Attributions.js, line 81

Bind globe to control

Name Type Description
globe GlobeViewExtended

the globe

inherited setOptions(options)

Itowns/Controls/Widget.js, line 145

Set the options of the control

Name Type Description
options Object

Options to associate to the widget.

inherited setTarget(target, position)

Itowns/Controls/Widget.js, line 66

Associates the widget to a specified target div.

Name Type Description
target HTMLElement | String

widget target div html element or target div id.

position String

html position attribute.