Class Camera

Accessors

  • get bearing(): number
  • The current bearing of the camera in degrees.

    Returns number

  • get maxPitch(): number
  • The maximum pitch of the camera in degrees.

    Returns number

  • get minPitch(): number
  • The minimum pitch of the camera in degrees.

    Returns number

  • get pitch(): number
  • The current pitch of the camera in degrees.

    Returns number

Methods

  • Animates the camera to a specified target.

    Parameters

    Returns Promise<void>

    map.Camera.animateTo({ center: coordinate, zoomLevel: 10 }, { duration: 500 });
    
  • Focuses the camera on a specific target or array of targets.

    Parameters

    • target: TCameraFocusOnTarget

      The target(s) to focus on, either a single element or an array of elements.

    • Optionaloptions: TFocusOnOptions

      Optional settings for focusing the camera.

    Returns Promise<void>

    // Focus on a single space
    map.Camera.focusOn(space, { minZoomLevel: 5, duration: 1000 });
  • Sets the camera to a specified target without animation.

    Parameters

    Returns void

    map.Camera.set({ center: coordinate, zoomLevel: 10 });
    
  • Update the maximum pitch of the camera in degrees.

    Parameters

    • maxPitch: number

      The new maximum pitch.

    Returns void

  • Update the minimum pitch of the camera in degrees.

    Parameters

    • minPitch: number

      The new minimum pitch.

    Returns void

  • Parameters

    • padding: InsetPadding

    Returns void