Options
All
  • Public
  • Public/Protected
  • All
Menu

The Camera object specifies a view of the map and allows manipulation of that view.

Hierarchy

Index

Accessors

currentAnimation

  • get currentAnimation(): undefined | Promise<undefined>
  • The current camera animation, if any. Resolves when the animation finishes.

    Returns undefined | Promise<undefined>

maxZoom

  • get maxZoom(): number
  • set maxZoom(meters: number): void
  • Maximum distance (in meters) the camera is allowed to get to the ground.

    Returns number

  • Maximum distance (in meters) the camera is allowed to get to the ground.

    Parameters

    • meters: number

    Returns void

minZoom

  • get minZoom(): number
  • set minZoom(meters: number): void
  • Minimum distance (in meters) the camera is allowed to get to the ground.

    Returns number

  • Minimum distance (in meters) the camera is allowed to get to the ground.

    Parameters

    • meters: number

    Returns void

rotation

  • get rotation(): number
  • Current Camera rotation (in radians)

    Returns number

tilt

  • get tilt(): number
  • Current Camera tilt

    Returns number

zoom

  • get zoom(): number
  • Current Camera zoom (in meters)

    Returns number

Methods

animate

  • Animate the Camera's view to smoothly transition to a new state over time. Returns a promise that resolves when the animation completes and gets rejected if the animation is cancelled.

    Parameters

    Returns Promise<undefined>

    a Promise that resolves when the animation finishes, or rejects when it is cancelled.

cancelAnimation

  • cancelAnimation(): void
  • Cancel the currently active Camera animation.

    Returns void

focusOn

  • Determine a new Camera view state based on a collection of targets, and start animating to that state.

    Parameters

    Returns Promise<any>

    a Promise that resolves when the animation finishes, or rejects when it is cancelled.

getSafeAreaInsets

  • getSafeAreaInsets(): any
  • Returns any

off

  • off<EVENT_NAME>(eventName: EVENT_NAME, fn: (payload: CAMERA_EVENT_PAYLOAD[EVENT_NAME]) => void): void

on

set

setSafeAreaInsets

  • setSafeAreaInsets(insets: { bottom: number; left: number; right: number; top: number }): void
  • Parameters

    • insets: { bottom: number; left: number; right: number; top: number }
      • bottom: number
      • left: number
      • right: number
      • top: number

    Returns void