Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

Index

Properties

interactions: { disable: () => void; enable: () => void } = ...

User camera interactions

Type declaration

  • disable: () => void
      • (): void
      • Disable all user interactions. This does not affect programmatic Camera controls, such as set and focusOn

        Returns void

  • enable: () => void
      • (): void
      • Enable all user interactions. This does not affect programmatic Camera controls, such as set and focusOn

        Returns void

Accessors

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

    Returns undefined | Promise<undefined>

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

    Returns number

  • Set the maximum distance (in meters) the camera is allowed to get from the ground.

    Parameters

    • meters: number

    Returns void

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

    Returns number

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

    Parameters

    • meters: number

    Returns void

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

    Returns number

  • get tilt(): number
  • Current Camera tilt between 0 (top-down) to 1 (from the side)

    Returns number

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

    Returns number

Methods

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

    Returns void

  • Focus the Camera view on a collection of targets and animate to that state.

    Parameters

    Returns Promise<any>

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

  • getSafeAreaInsets(): any
  • Returns any

  • off<EVENT_NAME>(eventName: EVENT_NAME, fn: (payload: CAMERA_EVENT_PAYLOAD[EVENT_NAME]) => void): void
  • 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