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 clockwise from North. 0 degrees is North, 90 degrees is East, 180 degrees is South, and 270 degrees is West.

    Returns number

  • get elevation(): number
  • The current elevation of the camera in meters.

    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 panMode(): "default" | "elevation"
  • The camera's current pan mode.

    Returns "default" | "elevation"

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

    Returns number

Methods

  • Experimental

    Animate the camera's elevation to a specified elevation.

    Parameters

    • elevation: number

      The target elevation in meters.

    • Optionaloptions: TCameraAnimationOptions

      Optional settings for the camera animation.

    Returns Promise<void>

  • 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

  • Experimental

    Set the camera's elevation in meters.

    Parameters

    • elevation: number

      The new elevation in meters.

    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

  • Experimental

    Set the camera's pan mode. 'elevation' moves the camera up and down, while 'default' allows the camera to pan along the ground.

    Parameters

    • panMode: "default" | "elevation"

      The new pan mode.

    Returns void

  • Parameters

    Returns void