forked from uiwjs/react-baidu-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tools.d.ts
44 lines (43 loc) · 1.25 KB
/
tools.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/// <reference path="./base.d.ts" />
/// <reference path="./core.d.ts" />
/// <reference path="./overlay.d.ts" />
declare namespace BMap {
class PushpinTool {
constructor(map: Map, opts?: PushpinToolOptions)
open(): boolean;
close(): boolean;
setIcon(icon: Icon): Icon;
getIcon(): Icon;
setCursor(cursor: string): string;
getCursor(): string;
toString(): string;
onmarkend: (event: { type: string, target: any, marker: Marker }) => void;
}
interface PushpinToolOptions {
icon?: Icon;
cursor?: string;
followText?: string;
}
class DistanceTool {
constructor(map: Map);
open(): boolean;
close(): void;
toString(): string;
ondrawend: (event: { type: string, target: any, points: Point[], polylines: Polyline[], distance: number }) => void;
}
class DragAndZoomTool {
constructor(map: Map, opts?: DragAndZoomToolOptions);
open(): boolean;
close(): void;
toString(): string;
ondrawend: (event: { type: string, target: any, bounds: Bounds[] }) => void;
}
interface DragAndZoomToolOptions {
zoomType?: ZoomType;
autoClose?: boolean;
followText?: string;
}
type ZoomType = number;
}
declare const BMAP_ZOOM_IN: BMap.ZoomType;
declare const BMAP_ZOOM_OUT: BMap.ZoomType;