UNPKG

vue-maplibre-gl

Version:

Vue 3 plugin for maplibre-gl

33 lines (32 loc) 1.98 kB
import { MglMap } from './components'; import { SourceLayerRegistry } from './lib/sourceLayer.registry'; import { Map, MapOptions, SourceSpecification, StyleSpecification } from 'maplibre-gl'; import { Emitter } from 'mitt'; import { InjectionKey, Ref, ShallowRef } from 'vue'; export declare const mapSymbol: InjectionKey<ShallowRef<Map | undefined>>, isLoadedSymbol: InjectionKey<Ref<boolean>>, isInitializedSymbol: InjectionKey<Ref<boolean>>, componentIdSymbol: InjectionKey<number>, sourceIdSymbol: InjectionKey<string>, sourceLayerRegistry: InjectionKey<SourceLayerRegistry>, emitterSymbol: InjectionKey<Emitter<MglEvents>>, fitBoundsOptionsSymbol: InjectionKey<FitBoundsOptions>; export type FitBoundsOptions = MapOptions['fitBoundsOptions'] & { useOnBoundsUpdate?: boolean; }; export interface MglEvent<T = any> { type: string; component: InstanceType<typeof MglMap>; map: Map; event: T; } export type MglEvents = { styleSwitched: StyleSwitchItem; }; export interface StyleSwitchItem { name: string; label: string; icon?: { path: string; }; style: StyleSpecification | string; } export type AllProps<T extends object> = { [K in keyof T]: undefined; }; export declare function AllOptions<T extends object>(obj: AllProps<Required<T>>): Array<keyof T>; export declare function AllSourceOptions<T = SourceSpecification>(obj: AllProps<Required<Omit<T, 'type'>>>): Array<keyof T>; export type ValidLanguages = 'sq' | 'am' | 'ar' | 'hy' | 'az' | 'eu' | 'be' | 'bs' | 'br' | 'bg' | 'ca' | 'zh' | 'co' | 'hr' | 'cs' | 'da' | 'nl' | 'en' | 'eo' | 'et' | 'fi' | 'fr' | 'fy' | 'ka' | 'de' | 'el' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'ga' | 'it' | 'ja' | 'ja-Hira' | 'ja_kana' | 'ja_rm' | 'ja-Latn' | 'kn' | 'kk' | 'ko' | 'ko-Latn' | 'ku' | 'la' | 'lv' | 'lt' | 'lb' | 'mk' | 'ml' | 'mt' | 'no' | 'oc' | 'pl' | 'pt' | 'ro' | 'rm' | 'ru' | 'gd' | 'sr' | 'sr-Latn' | 'sk' | 'sl' | 'es' | 'sv' | 'ta' | 'te' | 'th' | 'tr' | 'uk' | 'cy';