@deck.gl/carto 9.0.0-beta.8 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/common.d.ts +1 -1
- package/dist/api/common.js +1 -1
- package/dist/api/fetch-map.d.ts.map +1 -1
- package/dist/api/fetch-map.js +8 -3
- package/dist/api/request-with-parameters.d.ts.map +1 -1
- package/dist/api/request-with-parameters.js +35 -35
- package/dist/cartoRasterTile-worker.js +53 -21
- package/dist/cartoSpatialTile-worker.js +49 -14
- package/dist/cartoVectorTile-worker.js +49 -14
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +4 -0
- package/dist/dist.dev.js +809 -632
- package/dist/index.cjs +92 -71
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/layers/h3-tile-layer.d.ts.map +1 -1
- package/dist/layers/h3-tile-layer.js +3 -1
- package/dist/layers/quadbin-tile-layer.d.ts.map +1 -1
- package/dist/layers/quadbin-tile-layer.js +3 -1
- package/dist/layers/raster-layer.d.ts.map +1 -1
- package/dist/layers/raster-layer.js +5 -6
- package/dist/layers/raster-tile-layer.d.ts.map +1 -1
- package/dist/layers/raster-tile-layer.js +3 -1
- package/dist/layers/schema/carto-raster-tile-loader.d.ts +2 -2
- package/dist/layers/schema/carto-raster-tile-loader.d.ts.map +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.js +3 -4
- package/dist/layers/schema/carto-raster-tile.d.ts.map +1 -1
- package/dist/layers/schema/carto-raster-tile.js +2 -4
- package/dist/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist/layers/spatial-index-tile-layer.d.ts.map +1 -1
- package/dist/layers/spatial-index-tile-layer.js +4 -1
- package/dist/layers/vector-tile-layer.d.ts +5 -5
- package/dist/layers/vector-tile-layer.d.ts.map +1 -1
- package/dist/layers/vector-tile-layer.js +3 -1
- package/dist/sources/h3-query-source.d.ts.map +1 -1
- package/dist/sources/h3-query-source.js +2 -1
- package/dist/sources/h3-table-source.d.ts.map +1 -1
- package/dist/sources/h3-table-source.js +2 -4
- package/dist/sources/index.d.ts +1 -0
- package/dist/sources/index.d.ts.map +1 -1
- package/dist/sources/quadbin-query-source.d.ts.map +1 -1
- package/dist/sources/quadbin-query-source.js +2 -1
- package/dist/sources/quadbin-table-source.d.ts.map +1 -1
- package/dist/sources/quadbin-table-source.js +2 -4
- package/dist/sources/types.d.ts +38 -6
- package/dist/sources/types.d.ts.map +1 -1
- package/dist/sources/vector-query-source.d.ts +2 -4
- package/dist/sources/vector-query-source.d.ts.map +1 -1
- package/dist/sources/vector-query-source.js +8 -2
- package/dist/sources/vector-table-source.d.ts +2 -2
- package/dist/sources/vector-table-source.d.ts.map +1 -1
- package/dist/sources/vector-table-source.js +8 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +5 -1
- package/dist.min.js +9 -9
- package/package.json +15 -15
- package/src/api/common.ts +1 -1
- package/src/api/fetch-map.ts +8 -3
- package/src/api/request-with-parameters.ts +47 -34
- package/src/constants.ts +5 -0
- package/src/index.ts +7 -3
- package/src/layers/h3-tile-layer.ts +3 -1
- package/src/layers/quadbin-tile-layer.ts +3 -1
- package/src/layers/raster-layer.ts +7 -12
- package/src/layers/raster-tile-layer.ts +3 -1
- package/src/layers/schema/carto-raster-tile-loader.ts +5 -5
- package/src/layers/schema/carto-raster-tile.ts +3 -4
- package/src/layers/spatial-index-tile-layer.ts +4 -1
- package/src/layers/vector-tile-layer.ts +12 -8
- package/src/sources/h3-query-source.ts +2 -1
- package/src/sources/h3-table-source.ts +2 -6
- package/src/sources/index.ts +7 -0
- package/src/sources/quadbin-query-source.ts +2 -1
- package/src/sources/quadbin-table-source.ts +2 -6
- package/src/sources/types.ts +41 -6
- package/src/sources/vector-query-source.ts +22 -6
- package/src/sources/vector-table-source.ts +21 -3
- package/src/utils.ts +5 -1
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
+
import {DEFAULT_TILE_RESOLUTION} from '../constants';
|
|
2
3
|
import {baseSource} from './base-source';
|
|
3
4
|
import type {
|
|
4
5
|
FilterOptions,
|
|
5
6
|
SourceOptions,
|
|
6
7
|
QuerySourceOptions,
|
|
7
8
|
SpatialDataType,
|
|
8
|
-
TilejsonResult
|
|
9
|
+
TilejsonResult,
|
|
10
|
+
ColumnsOption
|
|
9
11
|
} from './types';
|
|
10
12
|
|
|
11
13
|
export type VectorQuerySourceOptions = SourceOptions &
|
|
12
14
|
QuerySourceOptions &
|
|
13
|
-
FilterOptions &
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
FilterOptions &
|
|
16
|
+
ColumnsOption;
|
|
17
|
+
|
|
16
18
|
type UrlParameters = {
|
|
17
19
|
columns?: string;
|
|
18
20
|
filters?: string;
|
|
19
21
|
spatialDataType: SpatialDataType;
|
|
20
22
|
spatialDataColumn?: string;
|
|
23
|
+
tileResolution?: string;
|
|
21
24
|
q: string;
|
|
22
25
|
queryParameters?: string;
|
|
23
26
|
};
|
|
@@ -25,8 +28,21 @@ type UrlParameters = {
|
|
|
25
28
|
export const vectorQuerySource = async function (
|
|
26
29
|
options: VectorQuerySourceOptions
|
|
27
30
|
): Promise<TilejsonResult> {
|
|
28
|
-
const {
|
|
29
|
-
|
|
31
|
+
const {
|
|
32
|
+
columns,
|
|
33
|
+
filters,
|
|
34
|
+
spatialDataColumn = 'geom',
|
|
35
|
+
sqlQuery,
|
|
36
|
+
tileResolution = DEFAULT_TILE_RESOLUTION,
|
|
37
|
+
queryParameters
|
|
38
|
+
} = options;
|
|
39
|
+
|
|
40
|
+
const urlParameters: UrlParameters = {
|
|
41
|
+
spatialDataColumn,
|
|
42
|
+
spatialDataType: 'geo',
|
|
43
|
+
tileResolution: tileResolution.toString(),
|
|
44
|
+
q: sqlQuery
|
|
45
|
+
};
|
|
30
46
|
|
|
31
47
|
if (columns) {
|
|
32
48
|
urlParameters.columns = columns.join(',');
|
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
+
import {DEFAULT_TILE_RESOLUTION} from '../constants';
|
|
2
3
|
import {baseSource} from './base-source';
|
|
3
4
|
import type {
|
|
4
5
|
FilterOptions,
|
|
6
|
+
ColumnsOption,
|
|
5
7
|
SourceOptions,
|
|
6
8
|
SpatialDataType,
|
|
7
9
|
TableSourceOptions,
|
|
8
10
|
TilejsonResult
|
|
9
11
|
} from './types';
|
|
10
12
|
|
|
11
|
-
export type VectorTableSourceOptions = SourceOptions &
|
|
13
|
+
export type VectorTableSourceOptions = SourceOptions &
|
|
14
|
+
TableSourceOptions &
|
|
15
|
+
FilterOptions &
|
|
16
|
+
ColumnsOption;
|
|
12
17
|
type UrlParameters = {
|
|
13
18
|
columns?: string;
|
|
14
19
|
filters?: string;
|
|
15
20
|
spatialDataType: SpatialDataType;
|
|
16
21
|
spatialDataColumn?: string;
|
|
22
|
+
tileResolution?: string;
|
|
17
23
|
name: string;
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
export const vectorTableSource = async function (
|
|
21
27
|
options: VectorTableSourceOptions
|
|
22
28
|
): Promise<TilejsonResult> {
|
|
23
|
-
const {
|
|
24
|
-
|
|
29
|
+
const {
|
|
30
|
+
columns,
|
|
31
|
+
filters,
|
|
32
|
+
spatialDataColumn = 'geom',
|
|
33
|
+
tableName,
|
|
34
|
+
tileResolution = DEFAULT_TILE_RESOLUTION
|
|
35
|
+
} = options;
|
|
36
|
+
|
|
37
|
+
const urlParameters: UrlParameters = {
|
|
38
|
+
name: tableName,
|
|
39
|
+
spatialDataColumn,
|
|
40
|
+
spatialDataType: 'geo',
|
|
41
|
+
tileResolution: tileResolution.toString()
|
|
42
|
+
};
|
|
25
43
|
|
|
26
44
|
if (columns) {
|
|
27
45
|
urlParameters.columns = columns.join(',');
|
package/src/utils.ts
CHANGED
|
@@ -51,7 +51,11 @@ export function scaleIdentity() {
|
|
|
51
51
|
return unknown;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
scale.copy = () =>
|
|
54
|
+
scale.copy = () => {
|
|
55
|
+
const scaleCopy = scaleIdentity();
|
|
56
|
+
scaleCopy.unknown(unknown);
|
|
57
|
+
return scaleCopy;
|
|
58
|
+
};
|
|
55
59
|
|
|
56
60
|
return scale;
|
|
57
61
|
}
|