UNPKG

vue3-maplibre-gl

Version:

Vue 3 components and composables for MapLibre GL JS - Build interactive maps with ease

40 lines (39 loc) 1.49 kB
import { Nullable } from '../../types'; import { MaybeRef } from 'vue'; import { Map, FlyToOptions, LngLatLike, CameraOptions } from 'maplibre-gl'; /** * Fly animation status enum for better state management */ export declare enum FlyStatus { NotStarted = "not-started", Flying = "flying", Completed = "completed", Error = "error" } interface FlyToProps { map: MaybeRef<Nullable<Map>>; options?: FlyToOptions; debug?: boolean; } interface FlyToActions { flyTo: (options?: FlyToOptions) => Promise<void>; flyToCenter: (center: LngLatLike, options?: Omit<FlyToOptions, 'center'>) => Promise<void>; flyToZoom: (zoom: number, options?: Omit<FlyToOptions, 'zoom'>) => Promise<void>; flyToBearing: (bearing: number, options?: Omit<FlyToOptions, 'bearing'>) => Promise<void>; flyToPitch: (pitch: number, options?: Omit<FlyToOptions, 'pitch'>) => Promise<void>; stopFlying: () => void; getCurrentCamera: () => CameraOptions | null; flyStatus: Readonly<FlyStatus>; isFlying: boolean; cleanup: () => void; } /** * Composable for managing smooth map camera fly animations with enhanced error handling * Provides reactive fly-to animations with validation and debugging capabilities * * @param props - Configuration options for fly-to animations * @returns Enhanced actions and state for camera fly animations */ export declare function useFlyTo(props: FlyToProps): FlyToActions; export {}; //# sourceMappingURL=useFlyTo.d.ts.map