import type { ExtractPropTypes, PropType } from 'vue'; import type { EventData, MapMouseEvent } from 'mapbox-gl'; import type { IndexAny } from '@mapbox-vue3/core/es/common'; import type { MapboxInstance } from './map-types'; import type Map from './map.vue'; export declare const mapProps: { zoom: { type: NumberConstructor; default: number; }; /** * 地图地理中心点坐标,采用经度、纬度的顺序 * The coordinates of the geographic center point of the map, in the order of longitude and latitude */ center: { type: PropType; default: () => number[]; validator: (value: number[]) => boolean; }; /** * 地图初始化时的方位角(旋转角度) * Azimuth (rotation angle) when the map is initialized */ bearing: { type: NumberConstructor; default: number; }; /** * 地图初始化时的倾角 * The tilt angle of the map when it is initialized */ pitch: { type: NumberConstructor; default: number; }; /** * 地图初始化时的四至范围。如果设置了 bounds 将会覆盖掉 center 和 zoom 的设置 * 其值为rectangle的西南点与东北点,例如:[[-73.9876, 40.7661], [-73.9397, 40.8002]] */ /** * The bounds of the map when it is initialized. If bounds is set, it will override the center and zoom settings * Its value is the southwest and northeast points of the rectangle, for example: [[-73.9876, 40.7661], [-73.9397, 40.8002]] */ bounds: { type: PropType; default: undefined; }; /** * 设置之后,地图将限制在给定的最大范围内 * When set, the map will be limited to the given maximum range. */ maxBounds: { type: PropType; default: undefined; }; /** * 是否开启抗锯齿模式; * 关闭后性能将有所提升 */ /** * Whether to enable anti-aliasing mode; * Performance will be improved after turning it off */ antialias: { type: BooleanConstructor; default: boolean; }; minzoom: { type: NumberConstructor; default: number; }; maxzoom: { type: NumberConstructor; default: number; }; hash: { type: (BooleanConstructor | StringConstructor)[]; default: boolean; }; interactive: { type: BooleanConstructor; default: boolean; }; bearingSnap: { type: NumberConstructor; default: number; }; pitchWithRotate: { type: BooleanConstructor; default: boolean; }; clickTolerance: { type: NumberConstructor; default: number; }; attributionControl: { type: BooleanConstructor; default: boolean; }; /** * 地图样式信息 * 包括字体文件路径以及精灵图资源路径 */ /** * Map style information * Including font file path and sprite resource path */ mapStyle: { type: PropType; default: () => { version: number; sources: {}; layers: never[]; /** * 字体文件路径 * Font file path */ glyphs: string; /** * 精灵图资源路径 * Sprite resource path */ sprite: string; }; }; glyphs: { type: StringConstructor; default: string; }; sprite: { type: StringConstructor; default: string; }; crs: PropType; extendProps: { type: PropType; default: () => {}; }; }; export type MapProps = ExtractPropTypes; export declare const mapEmits: { 'update:pitch': (pitch: number) => boolean; 'update:bearing': (bearing: number) => boolean; 'update:center': (center: number[]) => boolean; 'update:zoom': (zoom: number) => boolean; mousemove: ({ pixel, coordinates, originalEvent, }: { pixel: number[]; coordinates: number[]; originalEvent: MouseEvent; }) => boolean; click: ({ pixel, coordinates, originalEvent, }: { pixel: number[]; coordinates: number[]; originalEvent: MouseEvent; }) => boolean; dblclick: ({ pixel, coordinates, originalEvent, }: { pixel: number[]; coordinates: number[]; originalEvent: MouseEvent; }) => boolean; singleclick: ({ pixel, coordinates, originalEvent, }: { pixel: number[]; coordinates: number[]; originalEvent: MouseEvent; }) => boolean; mouseout: (event: MapMouseEvent & EventData) => boolean; created: (map: MapboxInstance) => boolean; }; export type MapEmits = typeof mapEmits; export type MapInstance = InstanceType;