Class Camera

Accessors

  • get bearing(): number
  • The current bearing 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.animate({ 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 });
    
  • Parameters

    • padding: InsetPadding

    Returns void