Interface ICamera

Interface for controlling the camera on the map.

Hierarchy

  • ICamera

Properties

animate: ((target, options?) => Promise<void>)

Type declaration

    • (target, options?): Promise<void>
    • Animates the camera to a specified target.

      Parameters

      Returns Promise<void>

      Example

      map.Camera.animate({ center: coordinate, zoomLevel: 10 }, { duration: 500 });
      
bearing: number

The current bearing of the camera in degrees.

center: Coordinate

The current center Coordinate of the camera.

focusOn: ((target, options?) => Promise<void>)

Type declaration

    • (target, options?): Promise<void>
    • 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.

      • Optional options: TFocusOnOptions

        Optional settings for focusing the camera.

      Returns Promise<void>

      Example

      // Focus on a single space
      map.Camera.focusOn(space, { minZoomLevel: 5, duration: 1000 });
maxZoomLevel: number

The maximum zoom level of the camera in mercator zoom levels.

minZoomLevel: number

The minimum zoom level of the camera in mercator zoom levels.

pitch: number

The current pitch of the camera in degrees.

set: ((target) => void)

Type declaration

    • (target): void
    • Sets the camera to a specified target without animation.

      Parameters

      Returns void

      Example

      map.Camera.set({ center: coordinate, zoomLevel: 10 });
      
setScreenOffsets: ((offsets) => void)

Type declaration

    • (offsets): void
    • Parameters

      • offsets: {
            bottom: number;
            left: number;
            right: number;
            top: number;
        }
        • bottom: number
        • left: number
        • right: number
        • top: number

      Returns void

zoomLevel: number

The current zoom level of the camera in mercator zoom levels.