UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

23 lines (22 loc) • 1.14 kB
import type { Coordinate } from 'ol/coordinate.js'; /** The services that can provide the footage displayed by a StreetView Component. */ export declare const STREETVIEW_PROVIDERS: readonly ["google"]; export type StreetViewProvider = (typeof STREETVIEW_PROVIDERS)[number]; /** The footage displayed by a provider: where it was taken (in the map projection) and the direction of sight. */ export type StreetViewView = { position: Coordinate; /** Direction of sight, in degrees clockwise from north. */ heading: number; /** Angle of sight above (positive) or below (negative) the horizon, in degrees. */ pitch: number; }; export declare function isStreetViewProvider(value: unknown): value is StreetViewProvider; /** Whether a value coming from a shared state is a usable view. */ export declare function isStreetViewView(value: unknown): value is StreetViewView; /** * The footage displayed by each StreetView provider. * The providers are independent: each of them follows the clicks on the map on its own. */ export default class StreetViewState { views: Partial<Record<StreetViewProvider, StreetViewView>>; }