MCPcopy
hub / github.com/antvis/L7 / IMapController

Interface IMapController

packages/scene/src/IMapController.ts:3–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import type { Bounds, ICameraOptions, ILngLat, IPoint, IStatusOptions, Point } from '@antv/l7-core';
2
3export default interface IMapController {
4 /**
5 * 当前缩放等级
6 */
7 getZoom(): number;
8
9 /**
10 * 中心点经纬度
11 */
12 getCenter(options?: ICameraOptions): ILngLat;
13
14 /**
15 * 仰角
16 */
17 getPitch(): number;
18
19 /**
20 * 逆时针旋转角度
21 */
22 getRotation(): number;
23
24 /**
25 * 获取当前地图可视区域 `[西南角、东北角]`
26 */
27 getBounds(): Bounds;
28
29 /**
30 * 放大地图
31 */
32 zoomIn(): void;
33
34 /**
35 * 缩小地图
36 */
37 zoomOut(): void;
38
39 /**
40 * 地图平移到指定点 `[x, y]`
41 */
42 panTo(p: Point): void;
43
44 /**
45 * 地图平移到指定点 `[x, y]`
46 */
47 panBy(x: number, y: number): void;
48
49 /**
50 * 调整地图适合指定区域
51 */
52 fitBounds(bound: Bounds, fitBoundsOptions?: unknown): void;
53
54 getContainer(): HTMLElement | null;
55 getSize(): [number, number];
56 // get map status method
57 getMinZoom(): number;
58 getMaxZoom(): number;
59 // get map params
60 getType(): string;

Callers 184

getZoomMethod · 0.65
getZoomFunction · 0.65
BaseMapService.tsFile · 0.65
TMapServiceClass · 0.65
getZoomMethod · 0.65
zoomInMethod · 0.65
zoomOutMethod · 0.65
getCenterMethod · 0.65
getPitchMethod · 0.65
getPitchFunction · 0.65
BaseMapService.tsFile · 0.65

Implementers 5

Scenepackages/scene/src/index.ts
TMapServicepackages/maps/src/gmap/map.ts
BMapServicepackages/maps/src/bmap/map.ts
TMapServicepackages/maps/src/tmap/map.ts
BMapServicepackages/maps/src/amap-next/map.ts

Calls

no outgoing calls

Tested by

no test coverage detected