-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathwithout-countries.d.ts
70 lines (62 loc) · 1.4 KB
/
without-countries.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
63
64
65
66
67
68
69
70
namespace DottedMapWithoutCountriesLib {
interface Region {
lat: { min: number; max: number };
lng: { min: number; max: number };
}
interface Map {
points: Point[];
X_MIN: number;
Y_MAX: number;
X_RANGE: number;
Y_RANGE: number;
region: Region;
grid: 'vertical' | 'diagonal';
width: number;
height: number;
ystep: number;
}
interface Settings extends MapSettings {
map: Map;
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 default class DottedMapWithoutCountries {
constructor(settings: DottedMapWithoutCountriesLib.Settings);
addPin(
pin: DottedMapWithoutCountriesLib.Pin,
): DottedMapWithoutCountriesLib.Point;
getPin(
pin: DottedMapWithoutCountriesLib.Pin,
): DottedMapWithoutCountriesLib.Point;
getPoints(): DottedMapWithoutCountriesLib.Point[];
getSVG(settings: DottedMapWithoutCountriesLib.SvgSettings): string;
image: {
region: DottedMap.Region;
width: number;
height: number;
};
}