UNPKG

vuepress-plugin-photomap

Version:

VuePress2插件,用于在文章中插入照片地图组件,类似Apple相册的PhotoMap功能

30 lines (29 loc) 1.09 kB
import { type Ref } from 'vue'; import type { PhotoData } from './useExifReader'; export interface MapOptions { style?: string; defaultZoom?: number; maxZoom?: number; markerSize?: number; clusterRadius?: number; enableTerrain?: boolean; enableSatelliteHybrid?: boolean; enableAtmosphere?: boolean; terrainExaggeration?: number; mapTilerApiKey?: string; mapType?: 'satellite' | 'terrain' | 'simple'; } export declare function useMapLibre(options?: MapOptions): { mapContainer: Ref<HTMLElement | undefined, HTMLElement | undefined>; map: Ref<any, any>; markers: Ref<any[], any[]>; isLoaded: Ref<boolean, boolean>; error: Ref<string | null, string | null>; initMap: (container: HTMLElement) => Promise<void>; addPhotoMarkers: (photos: PhotoData[], onMarkerClick: (photo: PhotoData, index: number) => void) => void; clearMarkers: () => void; flyToPhoto: (photo: PhotoData) => void; resizeMap: () => void; destroyMap: () => void; updateMapStyle: (newConfig: Partial<MapOptions>) => Promise<void>; };