Skip to content

AttributionControl

Class

The attribution control adds attribution information for ArcGIS Data services in a MapLibre GL JS Map.

Inheritance: AttributionControlAttributionControl

Constructors

constructor

Class Constructor
AttributionControl(optionsIAttributionControlOptions): AttributionControl

Constructor for AttributionControl.

Use dark colors for code blocksCopy
1
2
3
4
5
const attributionControl = new AttributionControl({
 customAttribution: ['Custom Attribution 1', 'Custom Attribution 2'],
 closed: false,
 compact: true,
});
Parameters
ParameterTypeDefaultNotes
optionsIAttributionControlOptions{}

Options for the attribution control.

Returns 
AttributionControl

Properties

Hide inherited properties
PropertyType
_attribHTML
inherited
string
_compact
inherited
boolean
HTMLElement
_container
inherited
HTMLElement
_editLink
inherited
HTMLAnchorElement
HTMLElement
_map
inherited
Map$1
() => void
() => void
() => void
_updateData
inherited
(eMapDataEvent) => void
options
inherited
AttributionControlOptions
styleId
inherited
string
styleOwner
inherited
string

_attribHTML

inheritedinherited
Class Property
_attribHTML: string
Inherited from maplibregl.AttributionControl._attribHTML

_compact

inheritedinherited
Class Property
_compact: boolean
Inherited from maplibregl.AttributionControl._compact

_compactButton

inheritedinherited
Class Property
_compactButton: HTMLElement
Inherited from maplibregl.AttributionControl._compactButton

_container

inheritedinherited
Class Property
_container: HTMLElement
Inherited from maplibregl.AttributionControl._container
inheritedinherited
Class Property
_editLink: HTMLAnchorElement
Inherited from maplibregl.AttributionControl._editLink

_innerContainer

inheritedinherited
Class Property
_innerContainer: HTMLElement
Inherited from maplibregl.AttributionControl._innerContainer

_map

inheritedinherited
Class Property
_map: Map$1
Inherited from maplibregl.AttributionControl._map

_toggleAttribution

inheritedinherited
Class Property
_toggleAttribution: () => void
Type declaration
    function(): void
    Returns 
    void
Inherited from maplibregl.AttributionControl._toggleAttribution

_updateCompact

inheritedinherited
Class Property
_updateCompact: () => void
Type declaration
    function(): void
    Returns 
    void
Inherited from maplibregl.AttributionControl._updateCompact

_updateCompactMinimize

inheritedinherited
Class Property
_updateCompactMinimize: () => void
Type declaration
    function(): void
    Returns 
    void
Inherited from maplibregl.AttributionControl._updateCompactMinimize

_updateData

inheritedinherited
Class Property
_updateData: (eMapDataEvent) => void
Type declaration
    function(eMapDataEvent): void
    Parameters
    ParameterType
    eMapDataEvent
    Returns 
    void
Inherited from maplibregl.AttributionControl._updateData

options

inheritedinherited
Class Property
options: AttributionControlOptions
Inherited from maplibregl.AttributionControl.options

styleId

inheritedinherited
Class Property
styleId: string
Inherited from maplibregl.AttributionControl.styleId

styleOwner

inheritedinherited
Class Property
styleOwner: string
Inherited from maplibregl.AttributionControl.styleOwner

Accessors

AccessorReturns
esriAttribution()AttributionControlOptions

esriAttribution

static
Class Accessor
esriAttribution(): AttributionControlOptions

Returns the default Esri attribution control options.

Returns 
AttributionControlOptions

MaplibreAttributionControlOptions

Methods

Hide inherited methods
MethodReturnsNotes
_setElementTitle(element, title)
inherited
void
void
ControlPosition

Optionally provide a default position for this control. If this method is implemented and Map.addControl is called without the position parameter, the value returned by getDefaultPosition will be used as the control's position.

onRemove()
inherited
void

{@inheritDoc IControl.onRemove}

_setElementTitle

inheritedinherited
Class Method
_setElementTitle(elementHTMLElement, title"ToggleAttribution" | "MapFeedback"): void
Parameters
ParameterType
elementHTMLElement
title"ToggleAttribution" | "MapFeedback"
Returns 
void
Inherited from maplibregl.AttributionControl._setElementTitle

_updateAttributions

inheritedinherited
Class Method
_updateAttributions(): void
Returns 
void
Inherited from maplibregl.AttributionControl._updateAttributions

getDefaultPosition

inheritedinherited
Class Method
getDefaultPosition(): ControlPosition

Optionally provide a default position for this control. If this method is implemented and Map.addControl is called without the position parameter, the value returned by getDefaultPosition will be used as the control's position.

Returns 
ControlPosition

a control position, one of the values valid in addControl.

Inherited from maplibregl.AttributionControl.getDefaultPosition

onRemove

inheritedinherited
Class Method
onRemove(): void

{@inheritDoc IControl.onRemove}

Returns 
void
Inherited from maplibregl.AttributionControl.onRemove

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.