PitchControl class

A control for changing the pitch of the map.

Extends

Constructors

PitchControl(PitchControlOptions)

Constructs a PitchControl.

Methods

onAdd(Map, ControlOptions)

Initialization method for the control which is called when added to the map.

onRemove()

Inherited Methods

buildContainer<K>(Map, ControlStyle, string, K)

Build the outermost container for the control, applies styling including any listeners for auto styling.

Constructor Details

PitchControl(PitchControlOptions)

Constructs a PitchControl.

new PitchControl(options?: PitchControlOptions)

Parameters

options
PitchControlOptions

The options for the control.

Method Details

onAdd(Map, ControlOptions)

Initialization method for the control which is called when added to the map.

function onAdd(map: Map, options?: ControlOptions): HTMLElement

Parameters

map
Map

The map that the control will be added to.

options
ControlOptions

The ControlOptions for this control.

Returns

HTMLElement

An HTMLElement to be placed on the map for the control.

onRemove()

function onRemove()

Inherited Method Details

buildContainer<K>(Map, ControlStyle, string, K)

Build the outermost container for the control, applies styling including any listeners for auto styling.

function buildContainer<K>(map: Map, style: ControlStyle, ariaLabel?: string, tagName?: K): HTMLElementTagNameMap[K]

Parameters

map
Map
style
ControlStyle
ariaLabel

string

tagName

K

Returns

HTMLElementTagNameMap[K]

Inherited From ControlBase.buildContainer