UNPKG

vue3-maplibre-gl

Version:

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

213 lines (212 loc) 10.1 kB
import { MaplibreActions } from '../types'; import { Map, MapContextEvent, MapDataEvent, MapLibreZoomEvent, MapMouseEvent, MapOptions, MapSourceDataEvent, MapTouchEvent, MapWheelEvent } from 'maplibre-gl'; /** * Enhanced Mapbox component props with comprehensive configuration options */ interface MapboxProps { /** Map configuration options */ options?: Partial<MapOptions>; /** Callback for registering map actions */ register?: (actions: MaplibreActions) => void; /** Enable debug logging */ debug?: boolean; /** Automatically cleanup resources on unmount */ autoCleanup?: boolean; /** Container ID for the map element */ containerId?: string; /** Custom container class names */ containerClass?: string; /** Error handling callback */ onError?: (error: any) => void; /** Load success callback */ onLoad?: (map: Map) => void; } declare function __VLS_template(): { loading?(_: {}): any; error?(_: {}): any; default?(_: {}): any; }; declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MapboxProps>, { options: () => { style: string; center: [number, number]; zoom: number; pitch: number; bearing: number; antialias: boolean; optimizeForTerrain: boolean; preserveDrawingBuffer: boolean; refreshExpiredTiles: boolean; maxTileCacheSize: null; localIdeographFontFamily: boolean; transformRequest: undefined; collectResourceTiming: boolean; fadeDuration: number; crossSourceCollisions: boolean; }; debug: boolean; autoCleanup: boolean; containerId: () => string; containerClass: string; }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { zoom: ((ev: any) => void) & ((ev: Event) => void); error: ((ev: any) => void) & ((ev: Event) => void); load: ((ev: any) => void) & ((ev: Event) => void); idle: ((ev: any) => void) & ((ev: Event) => void); remove: ((ev: any) => void) & ((ev: Event) => void); render: ((ev: any) => void) & ((ev: Event) => void); resize: ((ev: any) => void) & ((ev: Event) => void); webglcontextlost: ((ev: any) => void) & ((ev: MapContextEvent) => void); webglcontextrestored: ((ev: any) => void) & ((ev: MapContextEvent) => void); dataloading: ((ev: any) => void) & ((ev: MapDataEvent) => void); data: ((ev: any) => void) & ((ev: MapDataEvent) => void); tiledataloading: ((ev: any) => void) & ((ev: MapDataEvent) => void); sourcedataloading: ((ev: any) => void) & ((ev: MapSourceDataEvent) => void); styledataloading: (ev: any) => void; sourcedata: ((ev: any) => void) & ((ev: MapSourceDataEvent) => void); styledata: ((ev: any) => void) & ((ev: Event) => void); styleimagemissing: ((ev: any) => void) & ((ev: Event) => void); dataabort: ((ev: any) => void) & ((ev: MapDataEvent) => void); sourcedataabort: ((ev: any) => void) & ((ev: MapSourceDataEvent) => void); boxzoomcancel: ((ev: any) => void) & ((ev: MapLibreZoomEvent) => void); boxzoomstart: ((ev: any) => void) & ((ev: MapLibreZoomEvent) => void); boxzoomend: ((ev: any) => void) & ((ev: MapLibreZoomEvent) => void); touchcancel: ((ev: any) => void) & ((ev: MapTouchEvent) => void); touchmove: ((ev: any) => void) & ((ev: MapTouchEvent) => void); touchend: ((ev: any) => void) & ((ev: MapTouchEvent) => void); touchstart: ((ev: any) => void) & ((ev: MapTouchEvent) => void); click: ((ev: any) => void) & ((ev: MapMouseEvent) => void); contextmenu: ((ev: any) => void) & ((ev: MapMouseEvent) => void); dblclick: ((ev: any) => void) & ((ev: MapMouseEvent) => void); mousemove: ((ev: any) => void) & ((ev: MapMouseEvent) => void); mouseup: ((ev: any) => void) & ((ev: MapMouseEvent) => void); mousedown: ((ev: any) => void) & ((ev: MapMouseEvent) => void); mouseout: ((ev: any) => void) & ((ev: MapMouseEvent) => void); mouseover: ((ev: any) => void) & ((ev: MapMouseEvent) => void); movestart: ((ev: any) => void) & ((ev: Event) => void); move: ((ev: any) => void) & ((ev: Event) => void); moveend: ((ev: any) => void) & ((ev: Event) => void); zoomstart: ((ev: any) => void) & ((ev: Event) => void); zoomend: ((ev: any) => void) & ((ev: Event) => void); rotatestart: ((ev: any) => void) & ((ev: Event) => void); rotate: ((ev: any) => void) & ((ev: Event) => void); rotateend: ((ev: any) => void) & ((ev: Event) => void); dragstart: ((ev: any) => void) & ((ev: Event) => void); drag: ((ev: any) => void) & ((ev: Event) => void); dragend: ((ev: any) => void) & ((ev: Event) => void); pitchstart: ((ev: any) => void) & ((ev: Event) => void); pitch: ((ev: any) => void) & ((ev: Event) => void); pitchend: ((ev: any) => void) & ((ev: Event) => void); wheel: ((ev: any) => void) & ((ev: MapWheelEvent) => void); terrain: ((ev: any) => void) & ((ev: Event) => void); cooperativegestureprevented: (ev: any) => void; projectiontransition: (ev: any) => void; register: (actions: MaplibreActions) => void; }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MapboxProps>, { options: () => { style: string; center: [number, number]; zoom: number; pitch: number; bearing: number; antialias: boolean; optimizeForTerrain: boolean; preserveDrawingBuffer: boolean; refreshExpiredTiles: boolean; maxTileCacheSize: null; localIdeographFontFamily: boolean; transformRequest: undefined; collectResourceTiming: boolean; fadeDuration: number; crossSourceCollisions: boolean; }; debug: boolean; autoCleanup: boolean; containerId: () => string; containerClass: string; }>>> & Readonly<{ onZoom?: ((ev: Event) => any) | undefined; onError?: ((ev: Event) => any) | undefined; onLoad?: ((ev: Event) => any) | undefined; onIdle?: ((ev: Event) => any) | undefined; onRemove?: ((ev: Event) => any) | undefined; onRender?: ((ev: Event) => any) | undefined; onResize?: ((ev: Event) => any) | undefined; onWebglcontextlost?: ((ev: MapContextEvent) => any) | undefined; onWebglcontextrestored?: ((ev: MapContextEvent) => any) | undefined; onDataloading?: ((ev: MapDataEvent) => any) | undefined; onData?: ((ev: MapDataEvent) => any) | undefined; onTiledataloading?: ((ev: MapDataEvent) => any) | undefined; onSourcedataloading?: ((ev: MapSourceDataEvent) => any) | undefined; onStyledataloading?: ((ev: any) => any) | undefined; onSourcedata?: ((ev: MapSourceDataEvent) => any) | undefined; onStyledata?: ((ev: Event) => any) | undefined; onStyleimagemissing?: ((ev: Event) => any) | undefined; onDataabort?: ((ev: MapDataEvent) => any) | undefined; onSourcedataabort?: ((ev: MapSourceDataEvent) => any) | undefined; onBoxzoomcancel?: ((ev: MapLibreZoomEvent) => any) | undefined; onBoxzoomstart?: ((ev: MapLibreZoomEvent) => any) | undefined; onBoxzoomend?: ((ev: MapLibreZoomEvent) => any) | undefined; onTouchcancel?: ((ev: MapTouchEvent) => any) | undefined; onTouchmove?: ((ev: MapTouchEvent) => any) | undefined; onTouchend?: ((ev: MapTouchEvent) => any) | undefined; onTouchstart?: ((ev: MapTouchEvent) => any) | undefined; onClick?: ((ev: MapMouseEvent) => any) | undefined; onContextmenu?: ((ev: MapMouseEvent) => any) | undefined; onDblclick?: ((ev: MapMouseEvent) => any) | undefined; onMousemove?: ((ev: MapMouseEvent) => any) | undefined; onMouseup?: ((ev: MapMouseEvent) => any) | undefined; onMousedown?: ((ev: MapMouseEvent) => any) | undefined; onMouseout?: ((ev: MapMouseEvent) => any) | undefined; onMouseover?: ((ev: MapMouseEvent) => any) | undefined; onMovestart?: ((ev: Event) => any) | undefined; onMove?: ((ev: Event) => any) | undefined; onMoveend?: ((ev: Event) => any) | undefined; onZoomstart?: ((ev: Event) => any) | undefined; onZoomend?: ((ev: Event) => any) | undefined; onRotatestart?: ((ev: Event) => any) | undefined; onRotate?: ((ev: Event) => any) | undefined; onRotateend?: ((ev: Event) => any) | undefined; onDragstart?: ((ev: Event) => any) | undefined; onDrag?: ((ev: Event) => any) | undefined; onDragend?: ((ev: Event) => any) | undefined; onPitchstart?: ((ev: Event) => any) | undefined; onPitch?: ((ev: Event) => any) | undefined; onPitchend?: ((ev: Event) => any) | undefined; onWheel?: ((ev: MapWheelEvent) => any) | undefined; onTerrain?: ((ev: Event) => any) | undefined; onCooperativegestureprevented?: ((ev: any) => any) | undefined; onProjectiontransition?: ((ev: any) => any) | undefined; onRegister?: ((actions: MaplibreActions) => any) | undefined; }>, { debug: boolean; autoCleanup: boolean; options: Partial<MapOptions>; containerId: string; containerClass: string; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>; export default _default; type __VLS_NonUndefinedable<T> = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>; } : { type: import('vue').PropType<T[K]>; required: true; }; }; type __VLS_WithDefaults<P, D> = { [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & { default: D[K]; }> : P[K]; }; type __VLS_Prettify<T> = { [K in keyof T]: T[K]; } & {}; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; }; //# sourceMappingURL=Mapbox.vue.d.ts.map