-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathproject.d.ts
40 lines (35 loc) · 1.05 KB
/
project.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
declare namespace L {
class Point {
x: number;
y: number;
round(): Point;
}
class LatLng {
lat: number;
lng: number;
}
class Layer {
protected _map: Map;
fire(type: string, data?: any, propagate?: boolean): this;
on(type: string, fn: Function, context?: any): this;
}
class Map {
getContainer(): HTMLElement;
getPane(name?: string): HTMLElement | undefined;
addLayer(layer: Layer): this;
removeLayer(layer: Layer): this;
on(eventMap: {[name: string]: Function}): this;
off(eventMap: {[name: string]: Function}): this;
getSize(): Point;
getCenter(): LatLng;
getZoom(): number;
containerPointToLayerPoint(point: [number, number]): Point;
}
class Evented {
fire(type: string, data?: any, propagate?: boolean): this;
on(type: string, fn: Function, context?: any): this;
}
namespace DomUtil {
function setPosition(el: HTMLElement, position: Point): void;
}
}