-
Notifications
You must be signed in to change notification settings - Fork 18
/
TileServerConfig.ts
47 lines (40 loc) · 1.29 KB
/
TileServerConfig.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
import { PoolConfig } from 'pg';
import { TileCacheOptions } from './TileCacheOptions';
/**
* @description Configuration options for the tile server
*/
export interface TileServerConfig<T> {
/**
* @description The highest zoom level at which data is clustered.
* Any tile requests at zoom levels higher than this will return individual points only.
*/
maxZoomLevel?: number;
/**
* @description The tile resolution in pixels, default is 512, but try 256 if you
* are unsure what your mapping front-end library uses
* @deprecated This is ignored and will be removed in future releases
*/
resolution?: number;
/**
* @description LRU tile cache options, each tile request is stored in this cache.
* clusterbuster tries to provide sane defaults
*/
cacheOptions?: TileCacheOptions;
/**
* @description Configuration options for the postgres connection pool
* clusterbuster tries to provide sane defaults
*/
pgPoolOptions?: PoolConfig;
/**
* @description Optional callback to map the filters to where conditions in PostGreSQL
*/
filtersToWhere?: (queryParams: T | {}) => string[];
/**
* @description Attributes to select from the table
*/
attributes: string[];
/**
* @description Show debug logging, default false
*/
debug?: boolean;
}