1 |
|
2 | import { IControl } from 'mapbox-gl';
|
3 |
|
4 | interface Window {
|
5 | initAMap: () => void;
|
6 | }
|
7 | interface IAMapEvent {
|
8 | camera: {
|
9 | fov: number;
|
10 | near: number;
|
11 | far: number;
|
12 | height: number;
|
13 | pitch: number;
|
14 | rotation: number;
|
15 | aspect: number;
|
16 | position: { x: number; y: number };
|
17 | };
|
18 | }
|
19 |
|
20 | interface CustomCoords {
|
21 | getCameraParams(): void;
|
22 | getCenter(): void;
|
23 | getMVPMatrix(): void;
|
24 | [other:string]:any
|
25 | }
|
26 | interface IAMapInstance {
|
27 | get(key: string): unknown;
|
28 | getZooms?(): number[];
|
29 | customCoords?: CustomCoords;
|
30 | }
|
31 |
|
32 | interface IMapboxInstance {
|
33 | _controls: IControl[];
|
34 | transform: {
|
35 | width: number;
|
36 | height: number;
|
37 | };
|
38 | }
|
39 | interface IEventEmitter<EventTypes extends string | symbol = string | symbol> {
|
40 | emit(event: EventTypes, ...args: any[]): boolean;
|
41 | |
42 |
|
43 |
|
44 | on(event: EventTypes, handle: (...args: any[]) => void, context?: any): this;
|
45 |
|
46 | off(
|
47 | event: EventTypes,
|
48 | handle: (...args: any[]) => void,
|
49 | context?: any,
|
50 | once?: boolean,
|
51 | ): this;
|
52 |
|
53 | |
54 |
|
55 |
|
56 | removeAllListeners(event?: EventTypes): this;
|
57 | }
|