Class Camera

Accessors

  • get autoMinZoomLevel(): boolean
  • The mode of the camera to automatically set the minimum zoom level based on the size of the scene.

    Returns boolean

  • 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

  • get screenOffsets(): InsetPadding
  • Returns InsetPadding

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 });
    
  • Toggle the mode of the camera to automatically set the minimum zoom level based on the size of the scene. It will be automatically disabled when the minimum zoom level is set manually.

    Parameters

    • value: boolean

      The new value for the auto min zoom level mode.

    Returns void

  • 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