-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.ts
44 lines (41 loc) · 1.02 KB
/
interfaces.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
export interface IConfig {
/**
* Size of the square (in pixels) that each cluster accumulates markers from.
* Default: 60
*/
gridSize?: number;
/**
* Whether the center of a cluster should be recalculated when a marker is added.
* If false, center is always equal to the first marker added.
* Default: false
*/
averageCenter?: boolean;
/**
* Whether to log to the console the time spent clustering and passing data between Wasm/JS
* Default: false
*/
logTime?: boolean;
/**
* Whether the Wasm module should only return clusters that have changed since the last call.
* Setting to true will save time spent serializing data between Wasm/JS
* Default: true
*/
onlyReturnModifiedClusters?: boolean;
}
export interface IMarker {
lat: number;
lng: number;
}
export interface ICluster {
uuid?: string;
size: number;
center: IMarker;
bounds?: IBounds;
markers: IMarker[];
}
export interface IBounds {
north: number;
east: number;
south: number;
west: number;
}