@deck.gl/carto 9.0.34 → 9.1.0-beta.1
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/basemap.d.ts +2 -1
- package/dist/api/basemap.d.ts.map +1 -1
- package/dist/api/basemap.js +3 -0
- package/dist/api/fetch-map.d.ts.map +1 -1
- package/dist/api/fetch-map.js +9 -11
- package/dist/api/index.d.ts +1 -4
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +3 -2
- package/dist/api/layer-map.d.ts.map +1 -1
- package/dist/api/layer-map.js +5 -2
- package/dist/api/parse-map.d.ts.map +1 -1
- package/dist/api/parse-map.js +3 -0
- package/dist/api/types.d.ts +0 -56
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js +4 -20
- package/dist/basemap.d.ts +2 -1
- package/dist/basemap.d.ts.map +1 -1
- package/dist/basemap.js +4 -1
- package/dist/cartoRasterTile-worker.js +25 -2
- package/dist/cartoSpatialTile-worker.js +28 -3
- package/dist/cartoVectorTile-worker.js +29 -3
- package/dist/constants.d.ts +0 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/dist.dev.js +4512 -3855
- package/dist/index.cjs +328 -630
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +29 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/layers/cluster-tile-layer.d.ts +1 -1
- package/dist/layers/cluster-tile-layer.d.ts.map +1 -1
- package/dist/layers/cluster-tile-layer.js +4 -0
- package/dist/layers/cluster-utils.d.ts.map +1 -1
- package/dist/layers/cluster-utils.js +3 -0
- package/dist/layers/h3-tile-layer.d.ts +4 -4
- package/dist/layers/h3-tile-layer.d.ts.map +1 -1
- package/dist/layers/h3-tile-layer.js +15 -14
- package/dist/layers/h3-tileset-2d.d.ts.map +1 -1
- package/dist/layers/h3-tileset-2d.js +3 -0
- package/dist/layers/heatmap-tile-layer.d.ts +12 -2
- package/dist/layers/heatmap-tile-layer.d.ts.map +1 -1
- package/dist/layers/heatmap-tile-layer.js +85 -9
- package/dist/layers/heatmap.d.ts +69 -22
- package/dist/layers/heatmap.d.ts.map +1 -1
- package/dist/layers/heatmap.js +86 -102
- package/dist/layers/point-label-layer.d.ts.map +1 -1
- package/dist/layers/point-label-layer.js +5 -2
- package/dist/layers/post-process-utils.d.ts.map +1 -1
- package/dist/layers/post-process-utils.js +9 -5
- package/dist/layers/quadbin-layer.d.ts.map +1 -1
- package/dist/layers/quadbin-layer.js +3 -0
- package/dist/layers/quadbin-tile-layer.d.ts +4 -4
- package/dist/layers/quadbin-tile-layer.d.ts.map +1 -1
- package/dist/layers/quadbin-tile-layer.js +13 -12
- package/dist/layers/quadbin-tileset-2d.d.ts.map +1 -1
- package/dist/layers/quadbin-tileset-2d.js +3 -0
- package/dist/layers/quadbin-utils.d.ts.map +1 -1
- package/dist/layers/quadbin-utils.js +3 -0
- package/dist/layers/raster-layer-vertex.glsl.d.ts +1 -1
- package/dist/layers/raster-layer-vertex.glsl.d.ts.map +1 -1
- package/dist/layers/raster-layer-vertex.glsl.js +20 -25
- package/dist/layers/raster-layer.d.ts +6 -6
- package/dist/layers/raster-layer.d.ts.map +1 -1
- package/dist/layers/raster-layer.js +6 -1
- package/dist/layers/raster-tile-layer.d.ts +1 -1
- package/dist/layers/raster-tile-layer.d.ts.map +1 -1
- package/dist/layers/raster-tile-layer.js +14 -13
- package/dist/layers/schema/carto-properties-tile-loader.d.ts.map +1 -1
- package/dist/layers/schema/carto-properties-tile-loader.js +3 -0
- package/dist/layers/schema/carto-properties-tile.d.ts.map +1 -1
- package/dist/layers/schema/carto-properties-tile.js +3 -0
- package/dist/layers/schema/carto-raster-tile-loader.d.ts.map +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.js +4 -1
- package/dist/layers/schema/carto-raster-tile.d.ts.map +1 -1
- package/dist/layers/schema/carto-raster-tile.js +3 -0
- package/dist/layers/schema/carto-spatial-tile-loader.d.ts.map +1 -1
- package/dist/layers/schema/carto-spatial-tile-loader.js +4 -1
- package/dist/layers/schema/carto-spatial-tile.d.ts.map +1 -1
- package/dist/layers/schema/carto-spatial-tile.js +3 -0
- package/dist/layers/schema/carto-tile.d.ts.map +1 -1
- package/dist/layers/schema/carto-tile.js +3 -0
- package/dist/layers/schema/carto-vector-tile-loader.d.ts.map +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js +4 -1
- package/dist/layers/schema/fast-pbf.d.ts.map +1 -1
- package/dist/layers/schema/fast-pbf.js +3 -0
- package/dist/layers/schema/spatialjson-utils.d.ts.map +1 -1
- package/dist/layers/schema/spatialjson-utils.js +3 -0
- package/dist/layers/schema/tile-loader-utils.d.ts.map +1 -1
- package/dist/layers/schema/tile-loader-utils.js +3 -0
- package/dist/layers/spatial-index-tile-layer.d.ts.map +1 -1
- package/dist/layers/spatial-index-tile-layer.js +3 -0
- package/dist/layers/utils.d.ts +2 -2
- package/dist/layers/utils.d.ts.map +1 -1
- package/dist/layers/utils.js +3 -0
- package/dist/layers/vector-tile-layer.d.ts +1 -1
- package/dist/layers/vector-tile-layer.d.ts.map +1 -1
- package/dist/layers/vector-tile-layer.js +3 -0
- package/dist/style/color-bins-style.d.ts.map +1 -1
- package/dist/style/color-bins-style.js +3 -0
- package/dist/style/color-categories-style.d.ts.map +1 -1
- package/dist/style/color-categories-style.js +3 -0
- package/dist/style/color-continuous-style.d.ts.map +1 -1
- package/dist/style/color-continuous-style.js +3 -0
- package/dist/style/palette.d.ts.map +1 -1
- package/dist/style/palette.js +3 -0
- package/dist/style/utils.d.ts.map +1 -1
- package/dist/style/utils.js +3 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +3 -0
- package/dist/workers/cartoRasterTile.js +3 -0
- package/dist/workers/cartoSpatialTile.js +3 -0
- package/dist/workers/cartoVectorTile.js +3 -0
- package/dist.min.js +115 -101
- package/package.json +13 -11
- package/src/api/basemap.ts +6 -1
- package/src/api/fetch-map.ts +23 -15
- package/src/api/index.ts +5 -13
- package/src/api/layer-map.ts +6 -2
- package/src/api/parse-map.ts +4 -0
- package/src/api/types.ts +4 -75
- package/src/basemap.ts +6 -2
- package/src/constants.ts +4 -4
- package/src/index.ts +28 -9
- package/src/layers/cluster-tile-layer.ts +6 -1
- package/src/layers/cluster-utils.ts +4 -0
- package/src/layers/h3-tile-layer.ts +18 -16
- package/src/layers/h3-tileset-2d.ts +4 -0
- package/src/layers/heatmap-tile-layer.ts +115 -11
- package/src/layers/heatmap.ts +41 -99
- package/src/layers/point-label-layer.ts +6 -2
- package/src/layers/post-process-utils.ts +10 -5
- package/src/layers/quadbin-layer.ts +4 -0
- package/src/layers/quadbin-tile-layer.ts +16 -14
- package/src/layers/quadbin-tileset-2d.ts +4 -0
- package/src/layers/quadbin-utils.ts +4 -0
- package/src/layers/raster-layer-vertex.glsl.ts +21 -27
- package/src/layers/raster-layer.ts +7 -1
- package/src/layers/raster-tile-layer.ts +16 -14
- package/src/layers/schema/carto-properties-tile-loader.ts +4 -0
- package/src/layers/schema/carto-properties-tile.ts +4 -0
- package/src/layers/schema/carto-raster-tile-loader.ts +4 -0
- package/src/layers/schema/carto-raster-tile.ts +4 -0
- package/src/layers/schema/carto-spatial-tile-loader.ts +4 -0
- package/src/layers/schema/carto-spatial-tile.ts +4 -0
- package/src/layers/schema/carto-tile.ts +4 -0
- package/src/layers/schema/carto-vector-tile-loader.ts +4 -0
- package/src/layers/schema/fast-pbf.ts +4 -0
- package/src/layers/schema/spatialjson-utils.ts +4 -0
- package/src/layers/schema/tile-loader-utils.ts +4 -0
- package/src/layers/spatial-index-tile-layer.ts +4 -0
- package/src/layers/utils.ts +5 -1
- package/src/layers/vector-tile-layer.ts +5 -1
- package/src/style/color-bins-style.ts +4 -0
- package/src/style/color-categories-style.ts +4 -0
- package/src/style/color-continuous-style.ts +4 -0
- package/src/style/palette.ts +4 -0
- package/src/style/utils.ts +4 -0
- package/src/utils.ts +4 -0
- package/src/workers/cartoRasterTile.ts +4 -0
- package/src/workers/cartoSpatialTile.ts +4 -0
- package/src/workers/cartoVectorTile.ts +4 -0
- package/dist/api/carto-api-error.d.ts +0 -19
- package/dist/api/carto-api-error.d.ts.map +0 -1
- package/dist/api/carto-api-error.js +0 -48
- package/dist/api/common.d.ts +0 -5
- package/dist/api/common.d.ts.map +0 -1
- package/dist/api/common.js +0 -5
- package/dist/api/endpoints.d.ts +0 -23
- package/dist/api/endpoints.d.ts.map +0 -1
- package/dist/api/endpoints.js +0 -22
- package/dist/api/query.d.ts +0 -4
- package/dist/api/query.d.ts.map +0 -1
- package/dist/api/query.js +0 -26
- package/dist/api/request-with-parameters.d.ts +0 -9
- package/dist/api/request-with-parameters.d.ts.map +0 -1
- package/dist/api/request-with-parameters.js +0 -86
- package/dist/sources/base-source.d.ts +0 -5
- package/dist/sources/base-source.d.ts.map +0 -1
- package/dist/sources/base-source.js +0 -60
- package/dist/sources/boundary-query-source.d.ts +0 -10
- package/dist/sources/boundary-query-source.d.ts.map +0 -1
- package/dist/sources/boundary-query-source.js +0 -18
- package/dist/sources/boundary-table-source.d.ts +0 -8
- package/dist/sources/boundary-table-source.d.ts.map +0 -1
- package/dist/sources/boundary-table-source.js +0 -15
- package/dist/sources/h3-query-source.d.ts +0 -4
- package/dist/sources/h3-query-source.d.ts.map +0 -1
- package/dist/sources/h3-query-source.js +0 -22
- package/dist/sources/h3-table-source.d.ts +0 -4
- package/dist/sources/h3-table-source.d.ts.map +0 -1
- package/dist/sources/h3-table-source.js +0 -19
- package/dist/sources/h3-tileset-source.d.ts +0 -4
- package/dist/sources/h3-tileset-source.d.ts.map +0 -1
- package/dist/sources/h3-tileset-source.js +0 -6
- package/dist/sources/index.d.ts +0 -28
- package/dist/sources/index.d.ts.map +0 -1
- package/dist/sources/index.js +0 -13
- package/dist/sources/quadbin-query-source.d.ts +0 -4
- package/dist/sources/quadbin-query-source.d.ts.map +0 -1
- package/dist/sources/quadbin-query-source.js +0 -22
- package/dist/sources/quadbin-table-source.d.ts +0 -4
- package/dist/sources/quadbin-table-source.d.ts.map +0 -1
- package/dist/sources/quadbin-table-source.js +0 -19
- package/dist/sources/quadbin-tileset-source.d.ts +0 -4
- package/dist/sources/quadbin-tileset-source.d.ts.map +0 -1
- package/dist/sources/quadbin-tileset-source.js +0 -6
- package/dist/sources/raster-source.d.ts +0 -4
- package/dist/sources/raster-source.d.ts.map +0 -1
- package/dist/sources/raster-source.js +0 -9
- package/dist/sources/types.d.ts +0 -219
- package/dist/sources/types.d.ts.map +0 -1
- package/dist/sources/types.js +0 -1
- package/dist/sources/vector-query-source.d.ts +0 -4
- package/dist/sources/vector-query-source.d.ts.map +0 -1
- package/dist/sources/vector-query-source.js +0 -22
- package/dist/sources/vector-table-source.d.ts +0 -4
- package/dist/sources/vector-table-source.d.ts.map +0 -1
- package/dist/sources/vector-table-source.js +0 -19
- package/dist/sources/vector-tileset-source.d.ts +0 -4
- package/dist/sources/vector-tileset-source.d.ts.map +0 -1
- package/dist/sources/vector-tileset-source.js +0 -6
- package/src/api/carto-api-error.ts +0 -68
- package/src/api/common.ts +0 -6
- package/src/api/endpoints.ts +0 -69
- package/src/api/query.ts +0 -42
- package/src/api/request-with-parameters.ts +0 -117
- package/src/sources/base-source.ts +0 -79
- package/src/sources/boundary-query-source.ts +0 -39
- package/src/sources/boundary-table-source.ts +0 -33
- package/src/sources/h3-query-source.ts +0 -55
- package/src/sources/h3-table-source.ts +0 -51
- package/src/sources/h3-tileset-source.ts +0 -14
- package/src/sources/index.ts +0 -45
- package/src/sources/quadbin-query-source.ts +0 -56
- package/src/sources/quadbin-table-source.ts +0 -52
- package/src/sources/quadbin-tileset-source.ts +0 -14
- package/src/sources/raster-source.ts +0 -17
- package/src/sources/types.ts +0 -231
- package/src/sources/vector-query-source.ts +0 -57
- package/src/sources/vector-table-source.ts +0 -51
- package/src/sources/vector-tileset-source.ts +0 -14
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { baseSource } from "./base-source.js";
|
|
2
|
-
export const boundaryQuerySource = async function (options) {
|
|
3
|
-
const { columns, filters, tilesetTableName, propertiesSqlQuery, queryParameters } = options;
|
|
4
|
-
const urlParameters = {
|
|
5
|
-
tilesetTableName,
|
|
6
|
-
propertiesSqlQuery
|
|
7
|
-
};
|
|
8
|
-
if (columns) {
|
|
9
|
-
urlParameters.columns = columns.join(',');
|
|
10
|
-
}
|
|
11
|
-
if (filters) {
|
|
12
|
-
urlParameters.filters = filters;
|
|
13
|
-
}
|
|
14
|
-
if (queryParameters) {
|
|
15
|
-
urlParameters.queryParameters = queryParameters;
|
|
16
|
-
}
|
|
17
|
-
return baseSource('boundary', options, urlParameters);
|
|
18
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { FilterOptions, SourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
-
export type BoundaryTableSourceOptions = SourceOptions & FilterOptions & {
|
|
3
|
-
tilesetTableName: string;
|
|
4
|
-
columns?: string[];
|
|
5
|
-
propertiesTableName: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const boundaryTableSource: (options: BoundaryTableSourceOptions) => Promise<TilejsonResult>;
|
|
8
|
-
//# sourceMappingURL=boundary-table-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boundary-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/boundary-table-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAC,mBAAgB;AAE1E,MAAM,MAAM,0BAA0B,GAAG,aAAa,GACpD,aAAa,GAAG;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAQJ,eAAO,MAAM,mBAAmB,YACrB,0BAA0B,KAClC,QAAQ,cAAc,CAcxB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { baseSource } from "./base-source.js";
|
|
2
|
-
export const boundaryTableSource = async function (options) {
|
|
3
|
-
const { filters, tilesetTableName, columns, propertiesTableName } = options;
|
|
4
|
-
const urlParameters = {
|
|
5
|
-
tilesetTableName,
|
|
6
|
-
propertiesTableName
|
|
7
|
-
};
|
|
8
|
-
if (columns) {
|
|
9
|
-
urlParameters.columns = columns.join(',');
|
|
10
|
-
}
|
|
11
|
-
if (filters) {
|
|
12
|
-
urlParameters.filters = filters;
|
|
13
|
-
}
|
|
14
|
-
return baseSource('boundary', options, urlParameters);
|
|
15
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AggregationOptions, FilterOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
-
export type H3QuerySourceOptions = SourceOptions & QuerySourceOptions & AggregationOptions & FilterOptions;
|
|
3
|
-
export declare const h3QuerySource: (options: H3QuerySourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=h3-query-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"h3-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-query-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAC9C,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,CAAC;AAWhB,eAAO,MAAM,aAAa,YACf,oBAAoB,KAC5B,QAAQ,cAAc,CA0BxB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
import { DEFAULT_AGGREGATION_RES_LEVEL_H3 } from "../constants.js";
|
|
3
|
-
import { baseSource } from "./base-source.js";
|
|
4
|
-
export const h3QuerySource = async function (options) {
|
|
5
|
-
const { aggregationExp, aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_H3, sqlQuery, spatialDataColumn = 'h3', queryParameters, filters } = options;
|
|
6
|
-
const urlParameters = {
|
|
7
|
-
aggregationExp,
|
|
8
|
-
spatialDataColumn,
|
|
9
|
-
spatialDataType: 'h3',
|
|
10
|
-
q: sqlQuery
|
|
11
|
-
};
|
|
12
|
-
if (aggregationResLevel) {
|
|
13
|
-
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
14
|
-
}
|
|
15
|
-
if (queryParameters) {
|
|
16
|
-
urlParameters.queryParameters = queryParameters;
|
|
17
|
-
}
|
|
18
|
-
if (filters) {
|
|
19
|
-
urlParameters.filters = filters;
|
|
20
|
-
}
|
|
21
|
-
return baseSource('query', options, urlParameters);
|
|
22
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AggregationOptions, FilterOptions, SourceOptions, TableSourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
-
export type H3TableSourceOptions = SourceOptions & TableSourceOptions & AggregationOptions & FilterOptions;
|
|
3
|
-
export declare const h3TableSource: (options: H3TableSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=h3-table-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"h3-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-table-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAC9C,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,CAAC;AAWhB,eAAO,MAAM,aAAa,YACf,oBAAoB,KAC5B,QAAQ,cAAc,CAsBxB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
import { DEFAULT_AGGREGATION_RES_LEVEL_H3 } from "../constants.js";
|
|
3
|
-
import { baseSource } from "./base-source.js";
|
|
4
|
-
export const h3TableSource = async function (options) {
|
|
5
|
-
const { aggregationExp, aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_H3, spatialDataColumn = 'h3', tableName, filters } = options;
|
|
6
|
-
const urlParameters = {
|
|
7
|
-
aggregationExp,
|
|
8
|
-
name: tableName,
|
|
9
|
-
spatialDataColumn,
|
|
10
|
-
spatialDataType: 'h3'
|
|
11
|
-
};
|
|
12
|
-
if (aggregationResLevel) {
|
|
13
|
-
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
14
|
-
}
|
|
15
|
-
if (filters) {
|
|
16
|
-
urlParameters.filters = filters;
|
|
17
|
-
}
|
|
18
|
-
return baseSource('table', options, urlParameters);
|
|
19
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from "./types.js";
|
|
2
|
-
export type H3TilesetSourceOptions = SourceOptions & TilesetSourceOptions;
|
|
3
|
-
export declare const h3TilesetSource: (options: H3TilesetSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=h3-tileset-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"h3-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAC,mBAAgB;AAEjF,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAG1E,eAAO,MAAM,eAAe,YACjB,sBAAsB,KAC9B,QAAQ,cAAc,CAKxB,CAAC"}
|
package/dist/sources/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export { SOURCE_DEFAULTS } from "./base-source.js";
|
|
2
|
-
export type { TilejsonResult, GeojsonResult, JsonResult } from "./types.js";
|
|
3
|
-
export { boundaryQuerySource } from "./boundary-query-source.js";
|
|
4
|
-
export type { BoundaryQuerySourceOptions } from "./boundary-query-source.js";
|
|
5
|
-
export { boundaryTableSource } from "./boundary-table-source.js";
|
|
6
|
-
export type { BoundaryTableSourceOptions } from "./boundary-table-source.js";
|
|
7
|
-
export { h3QuerySource } from "./h3-query-source.js";
|
|
8
|
-
export type { H3QuerySourceOptions } from "./h3-query-source.js";
|
|
9
|
-
export { h3TableSource } from "./h3-table-source.js";
|
|
10
|
-
export type { H3TableSourceOptions } from "./h3-table-source.js";
|
|
11
|
-
export { h3TilesetSource } from "./h3-tileset-source.js";
|
|
12
|
-
export type { H3TilesetSourceOptions } from "./h3-tileset-source.js";
|
|
13
|
-
export { rasterSource } from "./raster-source.js";
|
|
14
|
-
export type { RasterSourceOptions } from "./raster-source.js";
|
|
15
|
-
export { quadbinQuerySource } from "./quadbin-query-source.js";
|
|
16
|
-
export type { QuadbinQuerySourceOptions } from "./quadbin-query-source.js";
|
|
17
|
-
export { quadbinTableSource } from "./quadbin-table-source.js";
|
|
18
|
-
export type { QuadbinTableSourceOptions } from "./quadbin-table-source.js";
|
|
19
|
-
export { quadbinTilesetSource } from "./quadbin-tileset-source.js";
|
|
20
|
-
export type { QuadbinTilesetSourceOptions } from "./quadbin-tileset-source.js";
|
|
21
|
-
export { vectorQuerySource } from "./vector-query-source.js";
|
|
22
|
-
export type { VectorQuerySourceOptions } from "./vector-query-source.js";
|
|
23
|
-
export { vectorTableSource } from "./vector-table-source.js";
|
|
24
|
-
export type { VectorTableSourceOptions } from "./vector-table-source.js";
|
|
25
|
-
export { vectorTilesetSource } from "./vector-tileset-source.js";
|
|
26
|
-
export type { VectorTilesetSourceOptions } from "./vector-tileset-source.js";
|
|
27
|
-
export type { SourceOptions, QuerySourceOptions, TableSourceOptions, TilesetSourceOptions } from "./types.js";
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sources/index.ts"],"names":[],"mappings":"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
-
export { SOURCE_DEFAULTS } from "./base-source.js";
|
|
2
|
-
export { boundaryQuerySource } from "./boundary-query-source.js";
|
|
3
|
-
export { boundaryTableSource } from "./boundary-table-source.js";
|
|
4
|
-
export { h3QuerySource } from "./h3-query-source.js";
|
|
5
|
-
export { h3TableSource } from "./h3-table-source.js";
|
|
6
|
-
export { h3TilesetSource } from "./h3-tileset-source.js";
|
|
7
|
-
export { rasterSource } from "./raster-source.js";
|
|
8
|
-
export { quadbinQuerySource } from "./quadbin-query-source.js";
|
|
9
|
-
export { quadbinTableSource } from "./quadbin-table-source.js";
|
|
10
|
-
export { quadbinTilesetSource } from "./quadbin-tileset-source.js";
|
|
11
|
-
export { vectorQuerySource } from "./vector-query-source.js";
|
|
12
|
-
export { vectorTableSource } from "./vector-table-source.js";
|
|
13
|
-
export { vectorTilesetSource } from "./vector-tileset-source.js";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AggregationOptions, FilterOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
-
export type QuadbinQuerySourceOptions = SourceOptions & QuerySourceOptions & AggregationOptions & FilterOptions;
|
|
3
|
-
export declare const quadbinQuerySource: (options: QuadbinQuerySourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=quadbin-query-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quadbin-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-query-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,yBAAyB,GAAG,aAAa,GACnD,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,CAAC;AAYhB,eAAO,MAAM,kBAAkB,YACpB,yBAAyB,KACjC,QAAQ,cAAc,CA0BxB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
import { DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN } from "../constants.js";
|
|
3
|
-
import { baseSource } from "./base-source.js";
|
|
4
|
-
export const quadbinQuerySource = async function (options) {
|
|
5
|
-
const { aggregationExp, aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN, sqlQuery, spatialDataColumn = 'quadbin', queryParameters, filters } = options;
|
|
6
|
-
const urlParameters = {
|
|
7
|
-
aggregationExp,
|
|
8
|
-
q: sqlQuery,
|
|
9
|
-
spatialDataColumn,
|
|
10
|
-
spatialDataType: 'quadbin'
|
|
11
|
-
};
|
|
12
|
-
if (aggregationResLevel) {
|
|
13
|
-
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
14
|
-
}
|
|
15
|
-
if (queryParameters) {
|
|
16
|
-
urlParameters.queryParameters = queryParameters;
|
|
17
|
-
}
|
|
18
|
-
if (filters) {
|
|
19
|
-
urlParameters.filters = filters;
|
|
20
|
-
}
|
|
21
|
-
return baseSource('query', options, urlParameters);
|
|
22
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AggregationOptions, FilterOptions, SourceOptions, TableSourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
-
export type QuadbinTableSourceOptions = SourceOptions & TableSourceOptions & AggregationOptions & FilterOptions;
|
|
3
|
-
export declare const quadbinTableSource: (options: QuadbinTableSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=quadbin-table-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quadbin-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-table-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,yBAAyB,GAAG,aAAa,GACnD,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,CAAC;AAWhB,eAAO,MAAM,kBAAkB,YACpB,yBAAyB,KACjC,QAAQ,cAAc,CAuBxB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
import { DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN } from "../constants.js";
|
|
3
|
-
import { baseSource } from "./base-source.js";
|
|
4
|
-
export const quadbinTableSource = async function (options) {
|
|
5
|
-
const { aggregationExp, aggregationResLevel = DEFAULT_AGGREGATION_RES_LEVEL_QUADBIN, spatialDataColumn = 'quadbin', tableName, filters } = options;
|
|
6
|
-
const urlParameters = {
|
|
7
|
-
aggregationExp,
|
|
8
|
-
name: tableName,
|
|
9
|
-
spatialDataColumn,
|
|
10
|
-
spatialDataType: 'quadbin'
|
|
11
|
-
};
|
|
12
|
-
if (aggregationResLevel) {
|
|
13
|
-
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
14
|
-
}
|
|
15
|
-
if (filters) {
|
|
16
|
-
urlParameters.filters = filters;
|
|
17
|
-
}
|
|
18
|
-
return baseSource('table', options, urlParameters);
|
|
19
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from "./types.js";
|
|
2
|
-
export type QuadbinTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
|
|
3
|
-
export declare const quadbinTilesetSource: (options: QuadbinTilesetSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=quadbin-tileset-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quadbin-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAC,mBAAgB;AAEjF,MAAM,MAAM,2BAA2B,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAG/E,eAAO,MAAM,oBAAoB,YACtB,2BAA2B,KACnC,QAAQ,cAAc,CAKxB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { FilterOptions, SourceOptions, TilejsonResult, TilesetSourceOptions } from "./types.js";
|
|
2
|
-
export type RasterSourceOptions = SourceOptions & TilesetSourceOptions & FilterOptions;
|
|
3
|
-
export declare const rasterSource: (options: RasterSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=raster-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"raster-source.d.ts","sourceRoot":"","sources":["../../src/sources/raster-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAC,mBAAgB;AAEhG,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAMvF,eAAO,MAAM,YAAY,YAA4B,mBAAmB,KAAG,QAAQ,cAAc,CAOhG,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { baseSource } from "./base-source.js";
|
|
2
|
-
export const rasterSource = async function (options) {
|
|
3
|
-
const { tableName, filters } = options;
|
|
4
|
-
const urlParameters = { name: tableName };
|
|
5
|
-
if (filters) {
|
|
6
|
-
urlParameters.filters = filters;
|
|
7
|
-
}
|
|
8
|
-
return baseSource('raster', options, urlParameters);
|
|
9
|
-
};
|
package/dist/sources/types.d.ts
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import type { Feature } from 'geojson';
|
|
2
|
-
import type { Filters, Format, MapInstantiation, QueryParameters } from "../api/types.js";
|
|
3
|
-
export type SourceRequiredOptions = {
|
|
4
|
-
/** Carto platform access token. */
|
|
5
|
-
accessToken: string;
|
|
6
|
-
/** Data warehouse connection name in Carto platform. */
|
|
7
|
-
connectionName: string;
|
|
8
|
-
};
|
|
9
|
-
export type SourceOptionalOptions = {
|
|
10
|
-
/**
|
|
11
|
-
* Base URL of the CARTO Maps API.
|
|
12
|
-
*
|
|
13
|
-
* Example for account located in EU-west region: `https://gcp-eu-west1.api.carto.com`
|
|
14
|
-
*
|
|
15
|
-
* @default https://gcp-us-east1.api.carto.com
|
|
16
|
-
*/
|
|
17
|
-
apiBaseUrl: string;
|
|
18
|
-
/**
|
|
19
|
-
* Custom HTTP headers added to map instantiation and data requests.
|
|
20
|
-
*/
|
|
21
|
-
headers: Record<string, string>;
|
|
22
|
-
/**
|
|
23
|
-
* Cache buster value returned by map instantiation.
|
|
24
|
-
*
|
|
25
|
-
* Carto source saves `cache` value of map instantiation response in `cache.value`, so it can be used to
|
|
26
|
-
* check if underlying map data has changed between distinct source requests.
|
|
27
|
-
*/
|
|
28
|
-
cache?: {
|
|
29
|
-
value?: number;
|
|
30
|
-
};
|
|
31
|
-
clientId: string;
|
|
32
|
-
/** @deprecated use `query` instead **/
|
|
33
|
-
format: Format;
|
|
34
|
-
/**
|
|
35
|
-
* Maximum URL character length. Above this limit, requests use POST.
|
|
36
|
-
* Used to avoid browser and CDN limits.
|
|
37
|
-
* @default {@link DEFAULT_MAX_LENGTH_URL}
|
|
38
|
-
*/
|
|
39
|
-
maxLengthURL?: number;
|
|
40
|
-
};
|
|
41
|
-
export type SourceOptions = SourceRequiredOptions & Partial<SourceOptionalOptions>;
|
|
42
|
-
export type AggregationOptions = {
|
|
43
|
-
/**
|
|
44
|
-
* Defines the aggregation expressions that will be calculated from the resulting columns on each grid cell.
|
|
45
|
-
*
|
|
46
|
-
* Example:
|
|
47
|
-
*
|
|
48
|
-
* sum(pop) as total_population, avg(rev) as average_revenue
|
|
49
|
-
*/
|
|
50
|
-
aggregationExp: string;
|
|
51
|
-
/**
|
|
52
|
-
* Defines the tile aggregation resolution.
|
|
53
|
-
*
|
|
54
|
-
* @default 6 for quadbin and 4 for h3 sources
|
|
55
|
-
*/
|
|
56
|
-
aggregationResLevel?: number;
|
|
57
|
-
};
|
|
58
|
-
export type FilterOptions = {
|
|
59
|
-
/**
|
|
60
|
-
* Filters to apply to the data source on the server
|
|
61
|
-
*/
|
|
62
|
-
filters?: Filters;
|
|
63
|
-
};
|
|
64
|
-
export type QuerySourceOptions = {
|
|
65
|
-
/**
|
|
66
|
-
* The column name and the type of geospatial support.
|
|
67
|
-
*
|
|
68
|
-
* If not present, defaults to `'geom'` for generic queries, `'quadbin'` for Quadbin sources and `'h3'` for H3 sources.
|
|
69
|
-
*/
|
|
70
|
-
spatialDataColumn?: string;
|
|
71
|
-
/** SQL query. */
|
|
72
|
-
sqlQuery: string;
|
|
73
|
-
/**
|
|
74
|
-
* Relative resolution of a tile. Higher values increase density and data size. At `tileResolution = 1`, tile geometry is
|
|
75
|
-
* quantized to a 1024x1024 grid. Increasing or decreasing the resolution will increase or decrease the dimensions of
|
|
76
|
-
* the quantization grid proportionately.
|
|
77
|
-
*
|
|
78
|
-
* Supported `tileResolution` values, with corresponding grid sizes:
|
|
79
|
-
*
|
|
80
|
-
* - 0.25: 256x256
|
|
81
|
-
* - 0.5: 512x512
|
|
82
|
-
* - 1: 1024x1024
|
|
83
|
-
* - 2: 2048x2048
|
|
84
|
-
* - 4: 4096x4096
|
|
85
|
-
*/
|
|
86
|
-
tileResolution?: TileResolution;
|
|
87
|
-
/**
|
|
88
|
-
* Values for named or positional paramteres in the query.
|
|
89
|
-
*
|
|
90
|
-
* The way query parameters are determined by data warehouse.
|
|
91
|
-
*
|
|
92
|
-
* * BigQuery has named query parameters, specified with a dictionary, and referenced by key (`@key`)
|
|
93
|
-
*
|
|
94
|
-
* ```
|
|
95
|
-
* sqlQuery: "SELECT * FROM carto-demo-data.demo_tables.retail_stores WHERE storetype = @type AND revenue > @minRevenue"
|
|
96
|
-
* queryParameters: { type: 'Supermarket', minRevenue: 1000000 }
|
|
97
|
-
* ```
|
|
98
|
-
* * Snowflake supports positional parameters, in the form `:1`, `:2`, etc.
|
|
99
|
-
*
|
|
100
|
-
* ```
|
|
101
|
-
* sqlQuery: "SELECT * FROM demo_db.public.import_retail_stores WHERE storetype = :2 AND revenue > :1
|
|
102
|
-
* queryParameters: [100000, "Supermarket"]
|
|
103
|
-
* ```
|
|
104
|
-
* * Postgres and Redhisft supports positional parameters, but in the form `$1`, `$2`, etc.
|
|
105
|
-
*
|
|
106
|
-
* ```
|
|
107
|
-
* sqlQuery: "SELECT * FROM carto_demo_data.demo_tables.retail_stores WHERE storetype = $2 AND revenue > $1
|
|
108
|
-
* queryParameters: [100000, "Supermarket"]
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
queryParameters?: QueryParameters;
|
|
112
|
-
};
|
|
113
|
-
export type TableSourceOptions = {
|
|
114
|
-
/**
|
|
115
|
-
* Fully qualified name of table.
|
|
116
|
-
*/
|
|
117
|
-
tableName: string;
|
|
118
|
-
/**
|
|
119
|
-
* The column name and the type of geospatial support.
|
|
120
|
-
*
|
|
121
|
-
* If not present, defaults to `'geom'` for generic tables, `'quadbin'` for Quadbin sources and `'h3'` for H3 sources.
|
|
122
|
-
*/
|
|
123
|
-
spatialDataColumn?: string;
|
|
124
|
-
/**
|
|
125
|
-
* Relative resolution of a tile. Higher values increase density and data size. At `tileResolution = 1`, tile geometry is
|
|
126
|
-
* quantized to a 1024x1024 grid. Increasing or decreasing the resolution will increase or decrease the dimensions of
|
|
127
|
-
* the quantization grid proportionately.
|
|
128
|
-
*
|
|
129
|
-
* Supported `tileResolution` values, with corresponding grid sizes:
|
|
130
|
-
*
|
|
131
|
-
* - 0.25: 256x256
|
|
132
|
-
* - 0.5: 512x512
|
|
133
|
-
* - 1: 1024x1024
|
|
134
|
-
* - 2: 2048x2048
|
|
135
|
-
* - 4: 4096x4096
|
|
136
|
-
*/
|
|
137
|
-
tileResolution?: TileResolution;
|
|
138
|
-
};
|
|
139
|
-
export type TilesetSourceOptions = {
|
|
140
|
-
/**
|
|
141
|
-
* Fully qualified name of tileset.
|
|
142
|
-
*/
|
|
143
|
-
tableName: string;
|
|
144
|
-
};
|
|
145
|
-
export type ColumnsOption = {
|
|
146
|
-
/**
|
|
147
|
-
* Columns to retrieve from the table.
|
|
148
|
-
*
|
|
149
|
-
* If not present, all columns are returned.
|
|
150
|
-
*/
|
|
151
|
-
columns?: string[];
|
|
152
|
-
};
|
|
153
|
-
export type SpatialDataType = 'geo' | 'h3' | 'quadbin';
|
|
154
|
-
export type TilejsonMapInstantiation = MapInstantiation & {
|
|
155
|
-
tilejson: {
|
|
156
|
-
url: string[];
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
export type TileResolution = 0.25 | 0.5 | 1 | 2 | 4;
|
|
160
|
-
export interface Tilejson {
|
|
161
|
-
tilejson: string;
|
|
162
|
-
name: string;
|
|
163
|
-
description: string;
|
|
164
|
-
version: string;
|
|
165
|
-
attribution: string;
|
|
166
|
-
scheme: string;
|
|
167
|
-
tiles: string[];
|
|
168
|
-
properties_tiles: string[];
|
|
169
|
-
minresolution: number;
|
|
170
|
-
maxresolution: number;
|
|
171
|
-
minzoom: number;
|
|
172
|
-
maxzoom: number;
|
|
173
|
-
bounds: [number, number, number, number];
|
|
174
|
-
center: [number, number, number];
|
|
175
|
-
vector_layers: VectorLayer[];
|
|
176
|
-
tilestats: Tilestats;
|
|
177
|
-
tileResolution?: TileResolution;
|
|
178
|
-
}
|
|
179
|
-
export interface Tilestats {
|
|
180
|
-
layerCount: number;
|
|
181
|
-
layers: Layer[];
|
|
182
|
-
}
|
|
183
|
-
export interface Layer {
|
|
184
|
-
layer: string;
|
|
185
|
-
count: number;
|
|
186
|
-
attributeCount: number;
|
|
187
|
-
attributes: Attribute[];
|
|
188
|
-
}
|
|
189
|
-
export interface Attribute {
|
|
190
|
-
attribute: string;
|
|
191
|
-
type: string;
|
|
192
|
-
}
|
|
193
|
-
export interface VectorLayer {
|
|
194
|
-
id: string;
|
|
195
|
-
minzoom: number;
|
|
196
|
-
maxzoom: number;
|
|
197
|
-
fields: Record<string, string>;
|
|
198
|
-
}
|
|
199
|
-
export type TilejsonResult = Tilejson & {
|
|
200
|
-
accessToken: string;
|
|
201
|
-
};
|
|
202
|
-
export type GeojsonResult = {
|
|
203
|
-
type: 'FeatureCollection';
|
|
204
|
-
features: Feature[];
|
|
205
|
-
};
|
|
206
|
-
export type JsonResult = any[];
|
|
207
|
-
export type QueryResult = {
|
|
208
|
-
meta: {
|
|
209
|
-
cacheHit: boolean;
|
|
210
|
-
location: string;
|
|
211
|
-
totalBytesProcessed: string;
|
|
212
|
-
};
|
|
213
|
-
rows: Record<string, any>[];
|
|
214
|
-
schema: {
|
|
215
|
-
name: string;
|
|
216
|
-
type: string;
|
|
217
|
-
}[];
|
|
218
|
-
};
|
|
219
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sources/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAC,wBAAqB;AAErF,MAAM,MAAM,qBAAqB,GAAG;IAClC,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IAEpB,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC;;;;;OAKG;IACH,KAAK,CAAC,EAAE;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;IAEzB,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,qBAAqB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AE,MAAM,CAAA;CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG;IAAC,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAC,CAAC;AAC7E,MAAM,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;AAC/B,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAC,CAAC;IACzE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAC5B,MAAM,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CACxC,CAAC"}
|
package/dist/sources/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { FilterOptions, SourceOptions, QuerySourceOptions, TilejsonResult, ColumnsOption } from "./types.js";
|
|
2
|
-
export type VectorQuerySourceOptions = SourceOptions & QuerySourceOptions & FilterOptions & ColumnsOption;
|
|
3
|
-
export declare const vectorQuerySource: (options: VectorQuerySourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=vector-query-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vector-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-query-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,kBAAkB,EAElB,cAAc,EACd,aAAa,EACd,mBAAgB;AAEjB,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAClD,kBAAkB,GAClB,aAAa,GACb,aAAa,CAAC;AAYhB,eAAO,MAAM,iBAAiB,YACnB,wBAAwB,KAChC,QAAQ,cAAc,CA2BxB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
import { DEFAULT_TILE_RESOLUTION } from "../constants.js";
|
|
3
|
-
import { baseSource } from "./base-source.js";
|
|
4
|
-
export const vectorQuerySource = async function (options) {
|
|
5
|
-
const { columns, filters, spatialDataColumn = 'geom', sqlQuery, tileResolution = DEFAULT_TILE_RESOLUTION, queryParameters } = options;
|
|
6
|
-
const urlParameters = {
|
|
7
|
-
spatialDataColumn,
|
|
8
|
-
spatialDataType: 'geo',
|
|
9
|
-
tileResolution: tileResolution.toString(),
|
|
10
|
-
q: sqlQuery
|
|
11
|
-
};
|
|
12
|
-
if (columns) {
|
|
13
|
-
urlParameters.columns = columns.join(',');
|
|
14
|
-
}
|
|
15
|
-
if (filters) {
|
|
16
|
-
urlParameters.filters = filters;
|
|
17
|
-
}
|
|
18
|
-
if (queryParameters) {
|
|
19
|
-
urlParameters.queryParameters = queryParameters;
|
|
20
|
-
}
|
|
21
|
-
return baseSource('query', options, urlParameters);
|
|
22
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { FilterOptions, ColumnsOption, SourceOptions, TableSourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
-
export type VectorTableSourceOptions = SourceOptions & TableSourceOptions & FilterOptions & ColumnsOption;
|
|
3
|
-
export declare const vectorTableSource: (options: VectorTableSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=vector-table-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vector-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-table-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAClD,kBAAkB,GAClB,aAAa,GACb,aAAa,CAAC;AAUhB,eAAO,MAAM,iBAAiB,YACnB,wBAAwB,KAChC,QAAQ,cAAc,CAuBxB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
import { DEFAULT_TILE_RESOLUTION } from "../constants.js";
|
|
3
|
-
import { baseSource } from "./base-source.js";
|
|
4
|
-
export const vectorTableSource = async function (options) {
|
|
5
|
-
const { columns, filters, spatialDataColumn = 'geom', tableName, tileResolution = DEFAULT_TILE_RESOLUTION } = options;
|
|
6
|
-
const urlParameters = {
|
|
7
|
-
name: tableName,
|
|
8
|
-
spatialDataColumn,
|
|
9
|
-
spatialDataType: 'geo',
|
|
10
|
-
tileResolution: tileResolution.toString()
|
|
11
|
-
};
|
|
12
|
-
if (columns) {
|
|
13
|
-
urlParameters.columns = columns.join(',');
|
|
14
|
-
}
|
|
15
|
-
if (filters) {
|
|
16
|
-
urlParameters.filters = filters;
|
|
17
|
-
}
|
|
18
|
-
return baseSource('table', options, urlParameters);
|
|
19
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SourceOptions, TilesetSourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
-
export type VectorTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
|
|
3
|
-
export declare const vectorTilesetSource: (options: VectorTilesetSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
-
//# sourceMappingURL=vector-tileset-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vector-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAC,mBAAgB;AAEjF,MAAM,MAAM,0BAA0B,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAG9E,eAAO,MAAM,mBAAmB,YACrB,0BAA0B,KAClC,QAAQ,cAAc,CAKxB,CAAC"}
|