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 54

Return the widget's container element.

Returns:
container element.

inherited getGlobe(){Object}

Itowns/Controls/Widget.js, line 104

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

inherited getPosition(){String}

Itowns/Controls/Widget.js, line 94

Return the widget's element position.

Returns:
element position.

inherited getTarget(){HTMLElement}

Itowns/Controls/Widget.js, line 84

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 setTarget(target, position)

Itowns/Controls/Widget.js, line 65

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.