Spec-Zone.ru › MapLibre GL JS

BoxZoomHandler

The BoxZoomHandler allows the user to zoom the map to fit within a bounding box. The bounding box is defined by clicking and holding shift while dragging the cursor.

Implements

  • Handler

Methods

disable()

disable(): void

Disables the "box zoom" interaction.

Returns

void

Example

map.boxZoom.disable();

Implementation of

Handler.disable


enable()

enable(): void

Enables the "box zoom" interaction.

Returns

void

Example

map.boxZoom.enable();

Implementation of

Handler.enable


isActive()

isActive(): boolean

Returns a Boolean indicating whether the "box zoom" interaction is active, i.e. currently being used.

Returns

boolean

true if the "box zoom" interaction is active.

Implementation of

Handler.isActive


isEnabled()

isEnabled(): boolean

Returns a Boolean indicating whether the "box zoom" interaction is enabled.

Returns

boolean

true if the "box zoom" interaction is enabled.

Implementation of

Handler.isEnabled


reset()

reset(): void

reset can be called by the manager at any time and must reset everything to it's original state

Returns

void

Implementation of

Handler.reset

© MapLibre contributors
Licensed under the 3-Clause BSD License.
https://maplibre.org/maplibre-gl-js/docs/API/classes/BoxZoomHandler/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API