-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathindex.d.ts
62 lines (53 loc) · 1.22 KB
/
index.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
namespace DottedMapLib {
interface Region {
lat: { min: number; max: number };
lng: { min: number; max: number };
}
interface MapSettings {
height?: number;
width?: number;
countries?: string[];
region?: Region;
grid?: 'vertical' | 'diagonal';
}
interface Settings extends MapSettings {
avoidOuterPins?: false | true;
}
interface SvgOptions {
color?: string;
radius?: number;
}
interface Pin {
lat: number;
lng: number;
data?: any;
svgOptions?: SvgOptions;
}
interface SvgSettings {
shape?: 'circle' | 'hexagon';
color?: string;
backgroundColor?: string;
radius?: number;
}
type Point = {
x: number;
y: number;
lat: number;
lng: number;
data?: any;
svgOptions?: SvgOptions;
};
}
export const getMapJSON: (settings: DottedMapLib.MapSettings) => string;
export default class DottedMap {
constructor(settings: DottedMapLib.Settings);
addPin(pin: DottedMapLib.Pin): DottedMapLib.Point;
getPin(pin: DottedMapLib.Pin): DottedMapLib.Point;
getPoints(): DottedMapLib.Point[];
getSVG(settings: DottedMapLib.SvgSettings): string;
image: {
region: DottedMap.Region;
width: number;
height: number;
};
}