@deck.gl/carto 8.10.0-alpha.1 → 8.10.0-alpha.4
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/LICENSE +1 -1
- package/dist/cartoRasterTile-worker.js +1084 -0
- package/dist/cartoSpatialTile-worker.js +1469 -0
- package/dist/cartoVectorTile-worker.js +1727 -0
- package/dist/dist.dev.js +1740 -883
- package/dist/es5/api/layer-map.js +3 -7
- package/dist/es5/api/layer-map.js.map +1 -1
- package/dist/es5/api/maps-api-common.js +0 -1
- package/dist/es5/api/maps-api-common.js.map +1 -1
- package/dist/es5/api/maps-v3-client.js +5 -20
- package/dist/es5/api/maps-v3-client.js.map +1 -1
- package/dist/es5/index.js +74 -6
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/layers/carto-layer.js +7 -5
- package/dist/es5/layers/carto-layer.js.map +1 -1
- package/dist/es5/layers/h3-tile-layer.js +23 -41
- package/dist/es5/layers/h3-tile-layer.js.map +1 -1
- package/dist/es5/layers/quadbin-layer.js +3 -0
- package/dist/es5/layers/quadbin-layer.js.map +1 -1
- package/dist/es5/layers/quadbin-tile-layer.js +21 -42
- package/dist/es5/layers/quadbin-tile-layer.js.map +1 -1
- package/dist/es5/layers/raster-tile-layer.js +23 -39
- package/dist/es5/layers/raster-tile-layer.js.map +1 -1
- package/dist/es5/layers/schema/carto-raster-tile-loader.js +13 -4
- package/dist/es5/layers/schema/carto-raster-tile-loader.js.map +1 -1
- package/dist/es5/layers/schema/carto-spatial-tile-loader.js +14 -8
- package/dist/es5/layers/schema/carto-spatial-tile-loader.js.map +1 -1
- package/dist/es5/layers/schema/carto-tile.js +1 -1
- package/dist/es5/layers/schema/carto-tile.js.map +1 -1
- package/dist/es5/layers/schema/carto-vector-tile-loader.js +64 -4
- package/dist/es5/layers/schema/carto-vector-tile-loader.js.map +1 -1
- package/dist/es5/layers/utils.js +29 -0
- package/dist/es5/layers/utils.js.map +1 -0
- package/dist/es5/layers/{carto-tile-layer.js → vector-tile-layer.js} +49 -24
- package/dist/es5/layers/vector-tile-layer.js.map +1 -0
- package/dist/es5/sources/base-source.js +100 -0
- package/dist/es5/sources/base-source.js.map +1 -0
- package/dist/es5/sources/common.js +48 -0
- package/dist/es5/sources/common.js.map +1 -0
- package/dist/es5/sources/h3-query-source.js +58 -0
- package/dist/es5/sources/h3-query-source.js.map +1 -0
- package/dist/es5/sources/h3-table-source.js +58 -0
- package/dist/es5/sources/h3-table-source.js.map +1 -0
- package/dist/es5/sources/h3-tileset-source.js +43 -0
- package/dist/es5/sources/h3-tileset-source.js.map +1 -0
- package/dist/es5/sources/index.js +94 -0
- package/dist/es5/sources/index.js.map +1 -0
- package/dist/es5/sources/quadbin-query-source.js +58 -0
- package/dist/es5/sources/quadbin-query-source.js.map +1 -0
- package/dist/es5/sources/quadbin-table-source.js +58 -0
- package/dist/es5/sources/quadbin-table-source.js.map +1 -0
- package/dist/es5/sources/quadbin-tileset-source.js +43 -0
- package/dist/es5/sources/quadbin-tileset-source.js.map +1 -0
- package/dist/es5/sources/raster-source.js +43 -0
- package/dist/es5/sources/raster-source.js.map +1 -0
- package/dist/es5/sources/utils.js +136 -0
- package/dist/es5/sources/utils.js.map +1 -0
- package/dist/es5/sources/vector-query-source.js +52 -0
- package/dist/es5/sources/vector-query-source.js.map +1 -0
- package/dist/es5/sources/vector-table-source.js +52 -0
- package/dist/es5/sources/vector-table-source.js.map +1 -0
- package/dist/es5/sources/vector-tileset-source.js +43 -0
- package/dist/es5/sources/vector-tileset-source.js.map +1 -0
- package/dist/es5/utils.js +5 -0
- package/dist/es5/utils.js.map +1 -1
- package/dist/es5/workers/cartoRasterTile.js +10 -0
- package/dist/es5/workers/cartoRasterTile.js.map +1 -0
- package/dist/es5/workers/cartoSpatialTile.js +10 -0
- package/dist/es5/workers/cartoSpatialTile.js.map +1 -0
- package/dist/es5/workers/cartoVectorTile.js +10 -0
- package/dist/es5/workers/cartoVectorTile.js.map +1 -0
- package/dist/esm/api/layer-map.js +3 -7
- package/dist/esm/api/layer-map.js.map +1 -1
- package/dist/esm/api/maps-api-common.js +0 -1
- package/dist/esm/api/maps-api-common.js.map +1 -1
- package/dist/esm/api/maps-v3-client.js +2 -12
- package/dist/esm/api/maps-v3-client.js.map +1 -1
- package/dist/esm/index.js +5 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layers/carto-layer.js +5 -3
- package/dist/esm/layers/carto-layer.js.map +1 -1
- package/dist/esm/layers/h3-tile-layer.js +21 -37
- package/dist/esm/layers/h3-tile-layer.js.map +1 -1
- package/dist/esm/layers/quadbin-layer.js +4 -1
- package/dist/esm/layers/quadbin-layer.js.map +1 -1
- package/dist/esm/layers/quadbin-tile-layer.js +18 -38
- package/dist/esm/layers/quadbin-tile-layer.js.map +1 -1
- package/dist/esm/layers/raster-tile-layer.js +19 -34
- package/dist/esm/layers/raster-tile-layer.js.map +1 -1
- package/dist/esm/layers/schema/carto-raster-tile-loader.js +12 -4
- package/dist/esm/layers/schema/carto-raster-tile-loader.js.map +1 -1
- package/dist/esm/layers/schema/carto-spatial-tile-loader.js +13 -8
- package/dist/esm/layers/schema/carto-spatial-tile-loader.js.map +1 -1
- package/dist/esm/layers/schema/carto-tile.js +1 -1
- package/dist/esm/layers/schema/carto-tile.js.map +1 -1
- package/dist/esm/layers/schema/carto-vector-tile-loader.js +63 -4
- package/dist/esm/layers/schema/carto-vector-tile-loader.js.map +1 -1
- package/dist/esm/layers/utils.js +14 -0
- package/dist/esm/layers/utils.js.map +1 -0
- package/dist/esm/layers/{carto-tile-layer.js → vector-tile-layer.js} +39 -15
- package/dist/esm/layers/vector-tile-layer.js.map +1 -0
- package/dist/esm/sources/base-source.js +49 -0
- package/dist/esm/sources/base-source.js.map +1 -0
- package/dist/esm/sources/common.js +26 -0
- package/dist/esm/sources/common.js.map +1 -0
- package/dist/esm/sources/h3-query-source.js +32 -0
- package/dist/esm/sources/h3-query-source.js.map +1 -0
- package/dist/esm/sources/h3-table-source.js +32 -0
- package/dist/esm/sources/h3-table-source.js.map +1 -0
- package/dist/esm/sources/h3-tileset-source.js +14 -0
- package/dist/esm/sources/h3-tileset-source.js.map +1 -0
- package/dist/esm/sources/index.js +12 -0
- package/dist/esm/sources/index.js.map +1 -0
- package/dist/esm/sources/quadbin-query-source.js +32 -0
- package/dist/esm/sources/quadbin-query-source.js.map +1 -0
- package/dist/esm/sources/quadbin-table-source.js +32 -0
- package/dist/esm/sources/quadbin-table-source.js.map +1 -0
- package/dist/esm/sources/quadbin-tileset-source.js +14 -0
- package/dist/esm/sources/quadbin-tileset-source.js.map +1 -0
- package/dist/esm/sources/raster-source.js +14 -0
- package/dist/esm/sources/raster-source.js.map +1 -0
- package/dist/esm/sources/utils.js +69 -0
- package/dist/esm/sources/utils.js.map +1 -0
- package/dist/esm/sources/vector-query-source.js +25 -0
- package/dist/esm/sources/vector-query-source.js.map +1 -0
- package/dist/esm/sources/vector-table-source.js +25 -0
- package/dist/esm/sources/vector-table-source.js.map +1 -0
- package/dist/esm/sources/vector-tileset-source.js +14 -0
- package/dist/esm/sources/vector-tileset-source.js.map +1 -0
- package/dist/esm/utils.js +3 -0
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/workers/cartoRasterTile.js +4 -0
- package/dist/esm/workers/cartoRasterTile.js.map +1 -0
- package/dist/esm/workers/cartoSpatialTile.js +4 -0
- package/dist/esm/workers/cartoSpatialTile.js.map +1 -0
- package/dist/esm/workers/cartoVectorTile.js +4 -0
- package/dist/esm/workers/cartoVectorTile.js.map +1 -0
- package/dist.min.js +25 -25
- package/package.json +12 -9
- package/src/api/layer-map.ts +4 -8
- package/src/api/maps-api-common.ts +0 -1
- package/src/api/maps-v3-client.ts +6 -5
- package/src/index.ts +34 -5
- package/src/layers/carto-layer.ts +8 -2
- package/src/layers/h3-tile-layer.ts +22 -35
- package/src/layers/quadbin-layer.ts +2 -1
- package/src/layers/quadbin-tile-layer.ts +19 -33
- package/src/layers/raster-tile-layer.ts +22 -26
- package/src/layers/schema/carto-raster-tile-loader.ts +26 -6
- package/src/layers/schema/carto-spatial-tile-loader.ts +25 -11
- package/src/layers/schema/carto-tile.ts +1 -1
- package/src/layers/schema/carto-vector-tile-loader.ts +79 -9
- package/src/layers/utils.ts +11 -0
- package/src/layers/{carto-tile-layer.ts → vector-tile-layer.ts} +40 -21
- package/src/sources/base-source.ts +55 -0
- package/src/sources/common.ts +132 -0
- package/src/sources/h3-query-source.ts +45 -0
- package/src/sources/h3-table-source.ts +46 -0
- package/src/sources/h3-tileset-source.ts +16 -0
- package/src/sources/index.ts +32 -0
- package/src/sources/quadbin-query-source.ts +46 -0
- package/src/sources/quadbin-table-source.ts +46 -0
- package/src/sources/quadbin-tileset-source.ts +16 -0
- package/src/sources/raster-source.ts +16 -0
- package/src/sources/utils.ts +63 -0
- package/src/sources/vector-query-source.ts +23 -0
- package/src/sources/vector-table-source.ts +23 -0
- package/src/sources/vector-tileset-source.ts +16 -0
- package/src/utils.ts +6 -0
- package/src/workers/cartoRasterTile.ts +4 -0
- package/src/workers/cartoSpatialTile.ts +4 -0
- package/src/workers/cartoVectorTile.ts +4 -0
- package/typed/api/layer-map.d.ts +2 -3
- package/typed/api/layer-map.d.ts.map +1 -1
- package/typed/api/maps-api-common.d.ts +0 -1
- package/typed/api/maps-api-common.d.ts.map +1 -1
- package/typed/api/maps-v3-client.d.ts +0 -3
- package/typed/api/maps-v3-client.d.ts.map +1 -1
- package/typed/index.d.ts +6 -4
- package/typed/index.d.ts.map +1 -1
- package/typed/layers/carto-layer.d.ts.map +1 -1
- package/typed/layers/h3-tile-layer.d.ts +5 -8
- package/typed/layers/h3-tile-layer.d.ts.map +1 -1
- package/typed/layers/quadbin-layer.d.ts.map +1 -1
- package/typed/layers/quadbin-tile-layer.d.ts +5 -9
- package/typed/layers/quadbin-tile-layer.d.ts.map +1 -1
- package/typed/layers/raster-tile-layer.d.ts +6 -10
- package/typed/layers/raster-tile-layer.d.ts.map +1 -1
- package/typed/layers/schema/carto-raster-tile-loader.d.ts.map +1 -1
- package/typed/layers/schema/carto-spatial-tile-loader.d.ts.map +1 -1
- package/typed/layers/schema/carto-vector-tile-loader.d.ts.map +1 -1
- package/typed/layers/utils.d.ts +5 -0
- package/typed/layers/utils.d.ts.map +1 -0
- package/typed/layers/{carto-tile-layer.d.ts → vector-tile-layer.d.ts} +11 -7
- package/typed/layers/vector-tile-layer.d.ts.map +1 -0
- package/typed/sources/base-source.d.ts +4 -0
- package/typed/sources/base-source.d.ts.map +1 -0
- package/typed/sources/common.d.ts +116 -0
- package/typed/sources/common.d.ts.map +1 -0
- package/typed/sources/h3-query-source.d.ts +5 -0
- package/typed/sources/h3-query-source.d.ts.map +1 -0
- package/typed/sources/h3-table-source.d.ts +5 -0
- package/typed/sources/h3-table-source.d.ts.map +1 -0
- package/typed/sources/h3-tileset-source.d.ts +5 -0
- package/typed/sources/h3-tileset-source.d.ts.map +1 -0
- package/typed/sources/index.d.ts +23 -0
- package/typed/sources/index.d.ts.map +1 -0
- package/typed/sources/quadbin-query-source.d.ts +5 -0
- package/typed/sources/quadbin-query-source.d.ts.map +1 -0
- package/typed/sources/quadbin-table-source.d.ts +5 -0
- package/typed/sources/quadbin-table-source.d.ts.map +1 -0
- package/typed/sources/quadbin-tileset-source.d.ts +5 -0
- package/typed/sources/quadbin-tileset-source.d.ts.map +1 -0
- package/typed/sources/raster-source.d.ts +5 -0
- package/typed/sources/raster-source.d.ts.map +1 -0
- package/typed/sources/utils.d.ts +15 -0
- package/typed/sources/utils.d.ts.map +1 -0
- package/typed/sources/vector-query-source.d.ts +5 -0
- package/typed/sources/vector-query-source.d.ts.map +1 -0
- package/typed/sources/vector-table-source.d.ts +5 -0
- package/typed/sources/vector-table-source.d.ts.map +1 -0
- package/typed/sources/vector-tileset-source.d.ts +5 -0
- package/typed/sources/vector-tileset-source.d.ts.map +1 -0
- package/typed/utils.d.ts +1 -0
- package/typed/utils.d.ts.map +1 -1
- package/typed/workers/cartoRasterTile.d.ts +2 -0
- package/typed/workers/cartoRasterTile.d.ts.map +1 -0
- package/typed/workers/cartoSpatialTile.d.ts +2 -0
- package/typed/workers/cartoSpatialTile.d.ts.map +1 -0
- package/typed/workers/cartoVectorTile.d.ts +2 -0
- package/typed/workers/cartoVectorTile.d.ts.map +1 -0
- package/dist/es5/layers/carto-tile-layer.js.map +0 -1
- package/dist/esm/layers/carto-tile-layer.js.map +0 -1
- package/typed/api/index.js +0 -3
- package/typed/api/layer-map.js +0 -264
- package/typed/api/maps-api-common.js +0 -50
- package/typed/api/maps-client.js +0 -125
- package/typed/api/maps-v3-client.js +0 -304
- package/typed/api/parseMap.js +0 -178
- package/typed/basemap.js +0 -9
- package/typed/config.js +0 -35
- package/typed/index.js +0 -10
- package/typed/layers/carto-layer.js +0 -173
- package/typed/layers/carto-tile-layer.d.ts.map +0 -1
- package/typed/layers/carto-tile-layer.js +0 -105
- package/typed/layers/h3-tile-layer.js +0 -47
- package/typed/layers/h3-tileset-2d.js +0 -85
- package/typed/layers/quadkey-tile-layer.d.ts +0 -21
- package/typed/layers/quadkey-tile-layer.d.ts.map +0 -1
- package/typed/layers/quadkey-tile-layer.js +0 -42
- package/typed/layers/quadkey-tileset-2d.d.ts +0 -15
- package/typed/layers/quadkey-tileset-2d.d.ts.map +0 -1
- package/typed/layers/quadkey-tileset-2d.js +0 -36
- package/typed/layers/schema/carto-tile.js +0 -161
- package/typed/layers/spatial-index-tile-layer.js +0 -40
- package/typed/style/color-bins-style.js +0 -12
- package/typed/style/color-categories-style.js +0 -16
- package/typed/style/color-continuous-style.js +0 -12
- package/typed/style/palette.js +0 -62
- package/typed/style/utils.js +0 -15
- package/typed/utils.js +0 -4
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoAggregationOptions, CartoSourceOptions, CartoTableSourceOptions, TilejsonSource } from './common';
|
|
2
|
+
export declare type CartoH3TableSourceOptions = CartoSourceOptions & CartoTableSourceOptions & CartoAggregationOptions;
|
|
3
|
+
declare const cartoH3TableSource: TilejsonSource<CartoH3TableSourceOptions>;
|
|
4
|
+
export { cartoH3TableSource };
|
|
5
|
+
//# sourceMappingURL=h3-table-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h3-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,oBAAY,yBAAyB,GAAG,kBAAkB,GACxD,uBAAuB,GACvB,uBAAuB,CAAC;AAU1B,QAAA,MAAM,kBAAkB,EAAE,cAAc,CAAC,yBAAyB,CAsBjE,CAAC;AAEF,OAAO,EAAC,kBAAkB,EAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoSourceOptions, CartoTilesetSourceOptions, TilejsonSource } from './common';
|
|
2
|
+
export declare type CartoH3TilesetSourceOptions = CartoSourceOptions & CartoTilesetSourceOptions;
|
|
3
|
+
declare const cartoH3TilesetSource: TilejsonSource<CartoH3TilesetSourceOptions>;
|
|
4
|
+
export { cartoH3TilesetSource };
|
|
5
|
+
//# sourceMappingURL=h3-tileset-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h3-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAEvF,oBAAY,2BAA2B,GAAG,kBAAkB,GAAG,yBAAyB,CAAC;AAGzF,QAAA,MAAM,oBAAoB,EAAE,cAAc,CAAC,2BAA2B,CAOrE,CAAC;AAEF,OAAO,EAAC,oBAAoB,EAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { SOURCE_DEFAULTS } from './common';
|
|
2
|
+
export type { CartoTilejsonResult, GeojsonResult, JsonResult } from './common';
|
|
3
|
+
export { cartoH3QuerySource } from './h3-query-source';
|
|
4
|
+
export type { CartoH3QuerySourceOptions } from './h3-query-source';
|
|
5
|
+
export { cartoH3TableSource } from './h3-table-source';
|
|
6
|
+
export type { CartoH3TableSourceOptions } from './h3-table-source';
|
|
7
|
+
export { cartoH3TilesetSource } from './h3-tileset-source';
|
|
8
|
+
export type { CartoH3TilesetSourceOptions } from './h3-tileset-source';
|
|
9
|
+
export { cartoRasterSource } from './raster-source';
|
|
10
|
+
export type { CartoRasterSourceOptions } from './raster-source';
|
|
11
|
+
export { cartoQuadbinQuerySource } from './quadbin-query-source';
|
|
12
|
+
export type { CartoQuadbinQuerySourceOptions } from './quadbin-query-source';
|
|
13
|
+
export { cartoQuadbinTableSource } from './quadbin-table-source';
|
|
14
|
+
export type { CartoQuadbinTableSourceOptions } from './quadbin-table-source';
|
|
15
|
+
export { cartoQuadbinTilesetSource } from './quadbin-tileset-source';
|
|
16
|
+
export type { CartoQuadbinTilesetSourceOptions } from './quadbin-tileset-source';
|
|
17
|
+
export { cartoVectorQuerySource } from './vector-query-source';
|
|
18
|
+
export type { CartoVectorQuerySourceOptions } from './vector-query-source';
|
|
19
|
+
export { cartoVectorTableSource } from './vector-table-source';
|
|
20
|
+
export type { CartoVectorTableSourceOptions } from './vector-table-source';
|
|
21
|
+
export { cartoVectorTilesetSource } from './vector-tileset-source';
|
|
22
|
+
export type { CartoVectorTilesetSourceOptions } from './vector-tileset-source';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AACzC,YAAY,EAAC,mBAAmB,EAAE,aAAa,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAE7E,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAC,yBAAyB,EAAC,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAC,yBAAyB,EAAC,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAC,2BAA2B,EAAC,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAC,wBAAwB,EAAC,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAC,8BAA8B,EAAC,MAAM,wBAAwB,CAAC;AAE3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAC,8BAA8B,EAAC,MAAM,wBAAwB,CAAC;AAE3E,OAAO,EAAC,yBAAyB,EAAC,MAAM,0BAA0B,CAAC;AACnE,YAAY,EAAC,gCAAgC,EAAC,MAAM,0BAA0B,CAAC;AAE/E,OAAO,EAAC,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AAC7D,YAAY,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAC,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AAC7D,YAAY,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAC,wBAAwB,EAAC,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAC,+BAA+B,EAAC,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoAggregationOptions, CartoQuerySourceOptions, CartoSourceOptions, TilejsonSource } from './common';
|
|
2
|
+
export declare type CartoQuadbinQuerySourceOptions = CartoSourceOptions & CartoQuerySourceOptions & CartoAggregationOptions;
|
|
3
|
+
declare const cartoQuadbinQuerySource: TilejsonSource<CartoQuadbinQuerySourceOptions>;
|
|
4
|
+
export { cartoQuadbinQuerySource };
|
|
5
|
+
//# sourceMappingURL=quadbin-query-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quadbin-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-query-source.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,oBAAY,8BAA8B,GAAG,kBAAkB,GAC7D,uBAAuB,GACvB,uBAAuB,CAAC;AAU1B,QAAA,MAAM,uBAAuB,EAAE,cAAc,CAAC,8BAA8B,CAsB3E,CAAC;AAEF,OAAO,EAAC,uBAAuB,EAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoAggregationOptions, CartoSourceOptions, CartoTableSourceOptions, TilejsonSource } from './common';
|
|
2
|
+
export declare type CartoQuadbinTableSourceOptions = CartoSourceOptions & CartoTableSourceOptions & CartoAggregationOptions;
|
|
3
|
+
declare const cartoQuadbinTableSource: TilejsonSource<CartoQuadbinTableSourceOptions>;
|
|
4
|
+
export { cartoQuadbinTableSource };
|
|
5
|
+
//# sourceMappingURL=quadbin-table-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quadbin-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,oBAAY,8BAA8B,GAAG,kBAAkB,GAC7D,uBAAuB,GACvB,uBAAuB,CAAC;AAU1B,QAAA,MAAM,uBAAuB,EAAE,cAAc,CAAC,8BAA8B,CAsB3E,CAAC;AAEF,OAAO,EAAC,uBAAuB,EAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoSourceOptions, CartoTilesetSourceOptions, TilejsonSource } from './common';
|
|
2
|
+
export declare type CartoQuadbinTilesetSourceOptions = CartoSourceOptions & CartoTilesetSourceOptions;
|
|
3
|
+
declare const cartoQuadbinTilesetSource: TilejsonSource<CartoQuadbinTilesetSourceOptions>;
|
|
4
|
+
export { cartoQuadbinTilesetSource };
|
|
5
|
+
//# sourceMappingURL=quadbin-tileset-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quadbin-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAEvF,oBAAY,gCAAgC,GAAG,kBAAkB,GAAG,yBAAyB,CAAC;AAG9F,QAAA,MAAM,yBAAyB,EAAE,cAAc,CAAC,gCAAgC,CAO/E,CAAC;AAEF,OAAO,EAAC,yBAAyB,EAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoSourceOptions, CartoTilesetSourceOptions, TypedSource } from './common';
|
|
2
|
+
export declare type CartoRasterSourceOptions = CartoSourceOptions & CartoTilesetSourceOptions;
|
|
3
|
+
declare const cartoRasterSource: TypedSource<CartoRasterSourceOptions>;
|
|
4
|
+
export { cartoRasterSource };
|
|
5
|
+
//# sourceMappingURL=raster-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raster-source.d.ts","sourceRoot":"","sources":["../../src/sources/raster-source.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAEpF,oBAAY,wBAAwB,GAAG,kBAAkB,GAAG,yBAAyB,CAAC;AAGtF,QAAA,MAAM,iBAAiB,EAAE,WAAW,CAAC,wBAAwB,CAO5D,CAAC;AAEF,OAAO,EAAC,iBAAiB,EAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { APIErrorContext } from '../api/carto-api-error';
|
|
2
|
+
import { MapType } from '../api/maps-api-common';
|
|
3
|
+
export declare function requestWithParameters<T = any>({ baseUrl, parameters, headers: customHeaders, errorContext }: {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
parameters?: Record<string, string>;
|
|
6
|
+
headers: Record<string, string>;
|
|
7
|
+
errorContext: APIErrorContext;
|
|
8
|
+
}): Promise<T>;
|
|
9
|
+
export declare function buildApiEndpoint({ apiBaseUrl, connectionName, endpoint, mapsUrl }: {
|
|
10
|
+
apiBaseUrl: string;
|
|
11
|
+
connectionName: string;
|
|
12
|
+
endpoint: MapType;
|
|
13
|
+
mapsUrl?: string;
|
|
14
|
+
}): string;
|
|
15
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/sources/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAkB,OAAO,EAAC,MAAM,wBAAwB,CAAC;AAIhE,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,GAAG,EAAE,EACnD,OAAO,EACP,UAAU,EACV,OAAO,EAAE,aAAa,EACtB,YAAY,EACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,YAAY,EAAE,eAAe,CAAC;CAC/B,GAAG,OAAO,CAAC,CAAC,CAAC,CAiCb;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,cAAc,EACd,QAAQ,EACR,OAAO,EACR,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAET"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoSourceOptions, CartoQuerySourceOptions, TypedSource } from './common';
|
|
2
|
+
export declare type CartoVectorQuerySourceOptions = CartoSourceOptions & CartoQuerySourceOptions;
|
|
3
|
+
declare const cartoVectorQuerySource: TypedSource<CartoVectorQuerySourceOptions>;
|
|
4
|
+
export { cartoVectorQuerySource };
|
|
5
|
+
//# sourceMappingURL=vector-query-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-query-source.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAE,uBAAuB,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAElF,oBAAY,6BAA6B,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;AAGzF,QAAA,MAAM,sBAAsB,EAAE,WAAW,CAAC,6BAA6B,CAatE,CAAC;AAEF,OAAO,EAAC,sBAAsB,EAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoSourceOptions, CartoTableSourceOptions, TypedSource } from './common';
|
|
2
|
+
export declare type CartoVectorTableSourceOptions = CartoSourceOptions & CartoTableSourceOptions;
|
|
3
|
+
declare const cartoVectorTableSource: TypedSource<CartoVectorTableSourceOptions>;
|
|
4
|
+
export { cartoVectorTableSource };
|
|
5
|
+
//# sourceMappingURL=vector-table-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAE,uBAAuB,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAElF,oBAAY,6BAA6B,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;AAGzF,QAAA,MAAM,sBAAsB,EAAE,WAAW,CAAC,6BAA6B,CAatE,CAAC;AAEF,OAAO,EAAC,sBAAsB,EAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartoSourceOptions, CartoTilesetSourceOptions, TilejsonSource } from './common';
|
|
2
|
+
export declare type CartoVectorTilesetSourceOptions = CartoSourceOptions & CartoTilesetSourceOptions;
|
|
3
|
+
declare const cartoVectorTilesetSource: TilejsonSource<CartoVectorTilesetSourceOptions>;
|
|
4
|
+
export { cartoVectorTilesetSource };
|
|
5
|
+
//# sourceMappingURL=vector-tileset-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAEvF,oBAAY,+BAA+B,GAAG,kBAAkB,GAAG,yBAAyB,CAAC;AAG7F,QAAA,MAAM,wBAAwB,EAAE,cAAc,CAAC,+BAA+B,CAO7E,CAAC;AAEF,OAAO,EAAC,wBAAwB,EAAC,CAAC"}
|
package/typed/utils.d.ts
CHANGED
package/typed/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAEhF,wBAAgB,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAE9E;AAID,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAC,YAAY,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,UAAU,EAAE,CAAA;CAAC,EAC5D,KAAK,EAAE,MAAM,cAed"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAEhF,wBAAgB,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAE9E;AAID,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAC,YAAY,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,UAAU,EAAE,CAAA;CAAC,EAC5D,KAAK,EAAE,MAAM,cAed;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAIvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartoRasterTile.d.ts","sourceRoot":"","sources":["../../src/workers/cartoRasterTile.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartoSpatialTile.d.ts","sourceRoot":"","sources":["../../src/workers/cartoSpatialTile.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartoVectorTile.d.ts","sourceRoot":"","sources":["../../src/workers/cartoVectorTile.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/layers/carto-tile-layer.ts"],"names":["CartoVectorTileLoader","defaultTileFormat","TILE_FORMATS","BINARY","defaultProps","MVTLayer","formatTiles","CartoTileLayer","binary","props","setState","tile","url","state","data","Promise","reject","loadOptions","getLoadOptions","fetch","signal","mimeType","propName","layer","tileBbox","bbox","west","south","east","north","subLayerProps","autoHighlight","extensions","ClipExtension","clipBounds","subLayer","GeoJsonLayer","params","info","index","sourceLayer","object","globalFeatureId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAIA;;AACA;;AAQA;;AACA;;AAEA;;;;;;;;;;AAfA,2BAAgB,CAACA,8BAAD,CAAhB;AAkBA,IAAMC,iBAAiB,GAAGC,4BAAaC,MAAvC;;AAEA,IAAMC,YAA+C,mCAChDC,oBAASD,YADuC;AAEnDE,EAAAA,WAAW,EAAEL;AAFsC,EAArD;;IAmBqBM,c;;;;;;;;;;;;WAMnB,2BAAwB;AACtB;AACA,UAAMC,MAAM,GAAG,KAAKC,KAAL,CAAWH,WAAX,KAA2BJ,4BAAaC,MAAvD;AACA,WAAKO,QAAL,CAAc;AAACF,QAAAA,MAAM,EAANA;AAAD,OAAd;AACD;;;WAED,qBAAYG,IAAZ,EAAiC;AAC/B,UAAMC,GAAG,GAAG,oCAAoB,KAAKC,KAAL,CAAWC,IAA/B,EAAqCH,IAArC,CAAZ;;AACA,UAAI,CAACC,GAAL,EAAU;AACR,eAAOG,OAAO,CAACC,MAAR,CAAe,aAAf,CAAP;AACD;;AAED,UAAIC,WAAW,GAAG,KAAKC,cAAL,EAAlB;AACA,wBAA6B,KAAKT,KAAlC;AAAA,UAAOU,KAAP,eAAOA,KAAP;AAAA,UAAcb,WAAd,eAAcA,WAAd;AACA,UAAOc,MAAP,GAAiBT,IAAjB,CAAOS,MAAP;;AAIA,UAAId,WAAW,KAAKJ,4BAAaC,MAAjC,EAAyC;AACvCc,QAAAA,WAAW,mCACNA,WADM;AAETI,UAAAA,QAAQ,EAAE;AAFD,UAAX;AAID;;AAED,aAAOF,KAAK,CAACP,GAAD,EAAM;AAACU,QAAAA,QAAQ,EAAE,MAAX;AAAmBC,QAAAA,KAAK,EAAE,IAA1B;AAAgCN,QAAAA,WAAW,EAAXA,WAAhC;AAA6CG,QAAAA,MAAM,EAANA;AAA7C,OAAN,CAAZ;AACD;;;WAED,yBACEX,KADF,EAOuB;AACrB,UAAIA,KAAK,CAACK,IAAN,KAAe,IAAnB,EAAyB;AACvB,eAAO,IAAP;AACD;;AAED,UAAMU,QAAQ,GAAGf,KAAK,CAACE,IAAN,CAAWc,IAA5B;AACA,UAAOC,IAAP,GAAmCF,QAAnC,CAAOE,IAAP;AAAA,UAAaC,KAAb,GAAmCH,QAAnC,CAAaG,KAAb;AAAA,UAAoBC,IAApB,GAAmCJ,QAAnC,CAAoBI,IAApB;AAAA,UAA0BC,KAA1B,GAAmCL,QAAnC,CAA0BK,KAA1B;;AAEA,UAAMC,aAAa,mCACdrB,KADc;AAEjBsB,QAAAA,aAAa,EAAE,KAFE;AAGjBC,QAAAA,UAAU,GAAG,IAAIC,yBAAJ,EAAH,0CAA4BxB,KAAK,CAACuB,UAAN,IAAoB,EAAhD,EAHO;AAIjBE,QAAAA,UAAU,EAAE,CAACR,IAAD,EAAOC,KAAP,EAAcC,IAAd,EAAoBC,KAApB;AAJK,QAAnB;;AAOA,UAAMM,QAAQ,GAAG,IAAIC,oBAAJ,CAAiBN,aAAjB,CAAjB;AACA,aAAOK,QAAP;AACD;;;WAED,wBAAeE,MAAf,EAAuB;AACrB,UAAMC,IAAI,kHAAwBD,MAAxB,CAAV;;AAEA,UAAI,KAAKxB,KAAL,CAAWL,MAAX,IAAqB8B,IAAI,CAACC,KAAL,KAAe,CAAC,CAAzC,EAA4C;AAC1C,YAAOzB,IAAP,GAAeuB,MAAM,CAACG,WAAP,CAAoB/B,KAAnC,CAAOK,IAAP;AACAwB,QAAAA,IAAI,CAACG,MAAL,GAAc,0BAAgB3B,IAAhB,EAAwC;AACpD4B,UAAAA,eAAe,EAAEJ,IAAI,CAACC;AAD8B,SAAxC,CAAd;AAGD;;AAED,aAAOD,IAAP;AACD;;;EAvEqEjC,mB;;;8BAAnDE,c,eAGA,gB;8BAHAA,c,kBAIGH,Y","sourcesContent":["import {registerLoaders} from '@loaders.gl/core';\nimport CartoVectorTileLoader from './schema/carto-vector-tile-loader';\nregisterLoaders([CartoVectorTileLoader]);\n\nimport {DefaultProps} from '@deck.gl/core';\nimport {ClipExtension} from '@deck.gl/extensions';\nimport {\n MVTLayer,\n MVTLayerProps,\n TileLayer,\n _getURLFromTemplate,\n _Tile2DHeader,\n _TileLoadProps as TileLoadProps\n} from '@deck.gl/geo-layers';\nimport {GeoJsonLayer} from '@deck.gl/layers';\nimport {binaryToGeojson} from '@loaders.gl/gis';\nimport type {BinaryFeatures} from '@loaders.gl/schema';\nimport {TileFormat, TILE_FORMATS} from '../api/maps-api-common';\nimport type {Feature} from 'geojson';\n\nconst defaultTileFormat = TILE_FORMATS.BINARY;\n\nconst defaultProps: DefaultProps<CartoTileLayerProps> = {\n ...MVTLayer.defaultProps,\n formatTiles: defaultTileFormat\n};\n\n/** All properties supported by CartoTileLayer. */\nexport type CartoTileLayerProps = _CartoTileLayerProps & MVTLayerProps;\n\n/** Properties added by CartoTileLayer. */\ntype _CartoTileLayerProps = {\n /** Use to override the default tile data format.\n *\n * Possible values are: `TILE_FORMATS.BINARY`, `TILE_FORMATS.GEOJSON` and `TILE_FORMATS.MVT`.\n *\n * Only supported when `apiVersion` is `API_VERSIONS.V3` and `format` is `FORMATS.TILEJSON`.\n */\n formatTiles?: TileFormat;\n};\n\nexport default class CartoTileLayer<ExtraProps extends {} = {}> extends MVTLayer<\n Required<_CartoTileLayerProps> & ExtraProps\n> {\n static layerName = 'CartoTileLayer';\n static defaultProps = defaultProps;\n\n initializeState(): void {\n super.initializeState();\n const binary = this.props.formatTiles === TILE_FORMATS.BINARY;\n this.setState({binary});\n }\n\n getTileData(tile: TileLoadProps) {\n const url = _getURLFromTemplate(this.state.data, tile);\n if (!url) {\n return Promise.reject('Invalid URL');\n }\n\n let loadOptions = this.getLoadOptions();\n const {fetch, formatTiles} = this.props;\n const {signal} = tile;\n\n // The backend doesn't yet support our custom mime-type, so force it here\n // TODO remove once backend sends the correct mime-type\n if (formatTiles === TILE_FORMATS.BINARY) {\n loadOptions = {\n ...loadOptions,\n mimeType: 'application/vnd.carto-vector-tile'\n };\n }\n\n return fetch(url, {propName: 'data', layer: this, loadOptions, signal});\n }\n\n renderSubLayers(\n props: TileLayer['props'] & {\n id: string;\n data: any;\n _offset: number;\n tile: _Tile2DHeader;\n }\n ): GeoJsonLayer | null {\n if (props.data === null) {\n return null;\n }\n\n const tileBbox = props.tile.bbox as any;\n const {west, south, east, north} = tileBbox;\n\n const subLayerProps = {\n ...props,\n autoHighlight: false,\n extensions: [new ClipExtension(), ...(props.extensions || [])],\n clipBounds: [west, south, east, north]\n };\n\n const subLayer = new GeoJsonLayer(subLayerProps);\n return subLayer;\n }\n\n getPickingInfo(params) {\n const info = super.getPickingInfo(params);\n\n if (this.state.binary && info.index !== -1) {\n const {data} = params.sourceLayer!.props;\n info.object = binaryToGeojson(data as BinaryFeatures, {\n globalFeatureId: info.index\n }) as Feature;\n }\n\n return info;\n }\n}\n"],"file":"carto-tile-layer.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/layers/carto-tile-layer.ts"],"names":["registerLoaders","CartoVectorTileLoader","ClipExtension","MVTLayer","_getURLFromTemplate","GeoJsonLayer","binaryToGeojson","TILE_FORMATS","defaultTileFormat","BINARY","defaultProps","formatTiles","CartoTileLayer","initializeState","binary","props","setState","getTileData","tile","url","state","data","Promise","reject","loadOptions","getLoadOptions","fetch","signal","mimeType","propName","layer","renderSubLayers","tileBbox","bbox","west","south","east","north","subLayerProps","autoHighlight","extensions","clipBounds","subLayer","getPickingInfo","params","info","index","sourceLayer","object","globalFeatureId"],"mappings":"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","sourcesContent":["import {registerLoaders} from '@loaders.gl/core';\nimport CartoVectorTileLoader from './schema/carto-vector-tile-loader';\nregisterLoaders([CartoVectorTileLoader]);\n\nimport {DefaultProps} from '@deck.gl/core';\nimport {ClipExtension} from '@deck.gl/extensions';\nimport {\n MVTLayer,\n MVTLayerProps,\n TileLayer,\n _getURLFromTemplate,\n _Tile2DHeader,\n _TileLoadProps as TileLoadProps\n} from '@deck.gl/geo-layers';\nimport {GeoJsonLayer} from '@deck.gl/layers';\nimport {binaryToGeojson} from '@loaders.gl/gis';\nimport type {BinaryFeatures} from '@loaders.gl/schema';\nimport {TileFormat, TILE_FORMATS} from '../api/maps-api-common';\nimport type {Feature} from 'geojson';\n\nconst defaultTileFormat = TILE_FORMATS.BINARY;\n\nconst defaultProps: DefaultProps<CartoTileLayerProps> = {\n ...MVTLayer.defaultProps,\n formatTiles: defaultTileFormat\n};\n\n/** All properties supported by CartoTileLayer. */\nexport type CartoTileLayerProps = _CartoTileLayerProps & MVTLayerProps;\n\n/** Properties added by CartoTileLayer. */\ntype _CartoTileLayerProps = {\n /** Use to override the default tile data format.\n *\n * Possible values are: `TILE_FORMATS.BINARY`, `TILE_FORMATS.GEOJSON` and `TILE_FORMATS.MVT`.\n *\n * Only supported when `apiVersion` is `API_VERSIONS.V3` and `format` is `FORMATS.TILEJSON`.\n */\n formatTiles?: TileFormat;\n};\n\nexport default class CartoTileLayer<ExtraProps extends {} = {}> extends MVTLayer<\n Required<_CartoTileLayerProps> & ExtraProps\n> {\n static layerName = 'CartoTileLayer';\n static defaultProps = defaultProps;\n\n initializeState(): void {\n super.initializeState();\n const binary = this.props.formatTiles === TILE_FORMATS.BINARY;\n this.setState({binary});\n }\n\n getTileData(tile: TileLoadProps) {\n const url = _getURLFromTemplate(this.state.data, tile);\n if (!url) {\n return Promise.reject('Invalid URL');\n }\n\n let loadOptions = this.getLoadOptions();\n const {fetch, formatTiles} = this.props;\n const {signal} = tile;\n\n // The backend doesn't yet support our custom mime-type, so force it here\n // TODO remove once backend sends the correct mime-type\n if (formatTiles === TILE_FORMATS.BINARY) {\n loadOptions = {\n ...loadOptions,\n mimeType: 'application/vnd.carto-vector-tile'\n };\n }\n\n return fetch(url, {propName: 'data', layer: this, loadOptions, signal});\n }\n\n renderSubLayers(\n props: TileLayer['props'] & {\n id: string;\n data: any;\n _offset: number;\n tile: _Tile2DHeader;\n }\n ): GeoJsonLayer | null {\n if (props.data === null) {\n return null;\n }\n\n const tileBbox = props.tile.bbox as any;\n const {west, south, east, north} = tileBbox;\n\n const subLayerProps = {\n ...props,\n autoHighlight: false,\n extensions: [new ClipExtension(), ...(props.extensions || [])],\n clipBounds: [west, south, east, north]\n };\n\n const subLayer = new GeoJsonLayer(subLayerProps);\n return subLayer;\n }\n\n getPickingInfo(params) {\n const info = super.getPickingInfo(params);\n\n if (this.state.binary && info.index !== -1) {\n const {data} = params.sourceLayer!.props;\n info.object = binaryToGeojson(data as BinaryFeatures, {\n globalFeatureId: info.index\n }) as Feature;\n }\n\n return info;\n }\n}\n"],"file":"carto-tile-layer.js"}
|
package/typed/api/index.js
DELETED
package/typed/api/layer-map.js
DELETED
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { deviation, extent, groupSort, median, variance } from 'd3-array';
|
|
2
|
-
import { rgb } from 'd3-color';
|
|
3
|
-
import { scaleLinear, scaleOrdinal, scaleLog, scalePoint, scaleQuantile, scaleQuantize, scaleSqrt, scaleThreshold } from 'd3-scale';
|
|
4
|
-
import { format as d3Format } from 'd3-format';
|
|
5
|
-
import moment from 'moment-timezone';
|
|
6
|
-
import { CPUGridLayer, HeatmapLayer, HexagonLayer } from '@deck.gl/aggregation-layers';
|
|
7
|
-
import { GeoJsonLayer } from '@deck.gl/layers';
|
|
8
|
-
import { H3HexagonLayer, MVTLayer } from '@deck.gl/geo-layers';
|
|
9
|
-
import CartoTileLayer from '../layers/carto-tile-layer';
|
|
10
|
-
import { TILE_FORMATS } from './maps-api-common';
|
|
11
|
-
import { assert } from '../utils';
|
|
12
|
-
const SCALE_FUNCS = {
|
|
13
|
-
linear: scaleLinear,
|
|
14
|
-
ordinal: scaleOrdinal,
|
|
15
|
-
log: scaleLog,
|
|
16
|
-
point: scalePoint,
|
|
17
|
-
quantile: scaleQuantile,
|
|
18
|
-
quantize: scaleQuantize,
|
|
19
|
-
sqrt: scaleSqrt,
|
|
20
|
-
custom: scaleThreshold
|
|
21
|
-
};
|
|
22
|
-
const UNKNOWN_COLOR = '#868d91';
|
|
23
|
-
export const AGGREGATION = {
|
|
24
|
-
average: 'MEAN',
|
|
25
|
-
maximum: 'MAX',
|
|
26
|
-
minimum: 'MIN',
|
|
27
|
-
sum: 'SUM'
|
|
28
|
-
};
|
|
29
|
-
export const OPACITY_MAP = {
|
|
30
|
-
getFillColor: 'opacity',
|
|
31
|
-
getLineColor: 'strokeOpacity',
|
|
32
|
-
getTextColor: 'opacity'
|
|
33
|
-
};
|
|
34
|
-
const AGGREGATION_FUNC = {
|
|
35
|
-
'count unique': (values, accessor) => groupSort(values, v => v.length, accessor).length,
|
|
36
|
-
median,
|
|
37
|
-
// Unfortunately mode() is only available in d3-array@3+ which is ESM only
|
|
38
|
-
mode: (values, accessor) => groupSort(values, v => v.length, accessor).pop(),
|
|
39
|
-
stddev: deviation,
|
|
40
|
-
variance
|
|
41
|
-
};
|
|
42
|
-
const hexToRGBA = c => {
|
|
43
|
-
const { r, g, b, opacity } = rgb(c);
|
|
44
|
-
return [r, g, b, 255 * opacity];
|
|
45
|
-
};
|
|
46
|
-
// Kepler -> Deck.gl
|
|
47
|
-
const sharedPropMap = {
|
|
48
|
-
color: 'getFillColor',
|
|
49
|
-
isVisible: 'visible',
|
|
50
|
-
label: 'cartoLabel',
|
|
51
|
-
textLabel: {
|
|
52
|
-
alignment: 'getTextAlignmentBaseline',
|
|
53
|
-
anchor: 'getTextAnchor',
|
|
54
|
-
color: 'getTextColor',
|
|
55
|
-
size: 'getTextSize'
|
|
56
|
-
},
|
|
57
|
-
visConfig: {
|
|
58
|
-
enable3d: 'extruded',
|
|
59
|
-
elevationScale: 'elevationScale',
|
|
60
|
-
filled: 'filled',
|
|
61
|
-
strokeColor: 'getLineColor',
|
|
62
|
-
stroked: 'stroked',
|
|
63
|
-
thickness: 'getLineWidth',
|
|
64
|
-
radius: 'getPointRadius',
|
|
65
|
-
wireframe: 'wireframe'
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const aggregationVisConfig = {
|
|
69
|
-
colorAggregation: x => ({ colorAggregation: AGGREGATION[x] || AGGREGATION.sum }),
|
|
70
|
-
colorRange: x => ({ colorRange: x.colors.map(hexToRGBA) }),
|
|
71
|
-
coverage: 'coverage',
|
|
72
|
-
elevationPercentile: ['elevationLowerPercentile', 'elevationUpperPercentile'],
|
|
73
|
-
percentile: ['lowerPercentile', 'upperPercentile']
|
|
74
|
-
};
|
|
75
|
-
const defaultProps = {
|
|
76
|
-
lineMiterLimit: 2,
|
|
77
|
-
lineWidthUnits: 'pixels',
|
|
78
|
-
pointRadiusUnits: 'pixels',
|
|
79
|
-
rounded: true,
|
|
80
|
-
wrapLongitude: false
|
|
81
|
-
};
|
|
82
|
-
function mergePropMaps(a = {}, b = {}) {
|
|
83
|
-
return { ...a, ...b, visConfig: { ...a.visConfig, ...b.visConfig } };
|
|
84
|
-
}
|
|
85
|
-
export function getLayer(type, config, dataset) {
|
|
86
|
-
if (type === 'mvt' || type === 'tileset') {
|
|
87
|
-
return getTileLayer(dataset);
|
|
88
|
-
}
|
|
89
|
-
const geoColumn = dataset?.geoColumn;
|
|
90
|
-
const getPosition = d => d[geoColumn].coordinates;
|
|
91
|
-
const hexagonId = config.columns?.hex_id;
|
|
92
|
-
const layerTypeDefs = {
|
|
93
|
-
point: {
|
|
94
|
-
Layer: GeoJsonLayer,
|
|
95
|
-
propMap: { visConfig: { outline: 'stroked' } }
|
|
96
|
-
},
|
|
97
|
-
geojson: {
|
|
98
|
-
Layer: GeoJsonLayer
|
|
99
|
-
},
|
|
100
|
-
grid: {
|
|
101
|
-
Layer: CPUGridLayer,
|
|
102
|
-
propMap: { visConfig: { ...aggregationVisConfig, worldUnitSize: x => ({ cellSize: 1000 * x }) } },
|
|
103
|
-
defaultProps: { getPosition }
|
|
104
|
-
},
|
|
105
|
-
heatmap: {
|
|
106
|
-
Layer: HeatmapLayer,
|
|
107
|
-
propMap: { visConfig: { ...aggregationVisConfig, radius: 'radiusPixels' } },
|
|
108
|
-
defaultProps: { getPosition }
|
|
109
|
-
},
|
|
110
|
-
hexagon: {
|
|
111
|
-
Layer: HexagonLayer,
|
|
112
|
-
propMap: { visConfig: { ...aggregationVisConfig, worldUnitSize: x => ({ radius: 1000 * x }) } },
|
|
113
|
-
defaultProps: { getPosition }
|
|
114
|
-
},
|
|
115
|
-
hexagonId: {
|
|
116
|
-
Layer: H3HexagonLayer,
|
|
117
|
-
propMap: { visConfig: { coverage: 'coverage' } },
|
|
118
|
-
defaultProps: { getHexagon: d => d[hexagonId], stroked: false }
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
const layer = layerTypeDefs[type];
|
|
122
|
-
assert(layer, `Unsupported layer type: ${type}`);
|
|
123
|
-
return {
|
|
124
|
-
...layer,
|
|
125
|
-
propMap: mergePropMaps(sharedPropMap, layer.propMap),
|
|
126
|
-
defaultProps: { ...defaultProps, ...layer.defaultProps }
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function getTileLayer(dataset) {
|
|
130
|
-
const { data: { tiles: [tileUrl] } } = dataset;
|
|
131
|
-
/* global URL */
|
|
132
|
-
const formatTiles = new URL(tileUrl).searchParams.get('formatTiles') || TILE_FORMATS.MVT;
|
|
133
|
-
return {
|
|
134
|
-
Layer: formatTiles === TILE_FORMATS.MVT ? MVTLayer : CartoTileLayer,
|
|
135
|
-
propMap: sharedPropMap,
|
|
136
|
-
defaultProps: {
|
|
137
|
-
...defaultProps,
|
|
138
|
-
uniqueIdProperty: 'geoid',
|
|
139
|
-
formatTiles
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function domainFromAttribute(attribute, scaleType) {
|
|
144
|
-
if (scaleType === 'ordinal' || scaleType === 'point') {
|
|
145
|
-
return attribute.categories.map(c => c.category).filter(c => c !== undefined && c !== null);
|
|
146
|
-
}
|
|
147
|
-
let { min } = attribute;
|
|
148
|
-
if (scaleType === 'log' && min === 0) {
|
|
149
|
-
min = 1e-5;
|
|
150
|
-
}
|
|
151
|
-
return [min, attribute.max];
|
|
152
|
-
}
|
|
153
|
-
function domainFromValues(values, scaleType) {
|
|
154
|
-
if (scaleType === 'ordinal') {
|
|
155
|
-
return groupSort(values, g => -g.length, d => d);
|
|
156
|
-
}
|
|
157
|
-
else if (scaleType === 'quantile') {
|
|
158
|
-
return values.sort((a, b) => a - b);
|
|
159
|
-
}
|
|
160
|
-
else if (scaleType === 'log') {
|
|
161
|
-
const [d0, d1] = extent(values);
|
|
162
|
-
return [d0 === 0 ? 1e-5 : d0, d1];
|
|
163
|
-
}
|
|
164
|
-
return extent(values);
|
|
165
|
-
}
|
|
166
|
-
function calculateDomain(data, name, scaleType) {
|
|
167
|
-
if (data.tilestats) {
|
|
168
|
-
// Tileset data type
|
|
169
|
-
const { attributes } = data.tilestats.layers[0];
|
|
170
|
-
const attribute = attributes.find(a => a.attribute === name);
|
|
171
|
-
return domainFromAttribute(attribute, scaleType);
|
|
172
|
-
}
|
|
173
|
-
else if (data.features) {
|
|
174
|
-
// GeoJSON data type
|
|
175
|
-
const values = data.features.map(({ properties }) => properties[name]);
|
|
176
|
-
return domainFromValues(values, scaleType);
|
|
177
|
-
}
|
|
178
|
-
else if (Array.isArray(data) && data[0][name] !== undefined) {
|
|
179
|
-
// JSON data type
|
|
180
|
-
const values = data.map(properties => properties[name]);
|
|
181
|
-
return domainFromValues(values, scaleType);
|
|
182
|
-
}
|
|
183
|
-
return [0, 1];
|
|
184
|
-
}
|
|
185
|
-
function normalizeAccessor(accessor, data) {
|
|
186
|
-
if (data.features || data.tilestats) {
|
|
187
|
-
return ({ properties }) => {
|
|
188
|
-
return accessor(properties);
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
return accessor;
|
|
192
|
-
}
|
|
193
|
-
export function opacityToAlpha(opacity) {
|
|
194
|
-
return opacity !== undefined ? Math.round(255 * Math.pow(opacity, 1 / 2.2)) : 255;
|
|
195
|
-
}
|
|
196
|
-
export function getColorValueAccessor({ name }, colorAggregation, data) {
|
|
197
|
-
const aggregator = AGGREGATION_FUNC[colorAggregation];
|
|
198
|
-
const accessor = values => aggregator(values, p => p[name]);
|
|
199
|
-
return normalizeAccessor(accessor, data);
|
|
200
|
-
}
|
|
201
|
-
export function getColorAccessor({ name }, scaleType, { colors, colorMap }, opacity, data) {
|
|
202
|
-
const scale = SCALE_FUNCS[scaleType]();
|
|
203
|
-
let domain = [];
|
|
204
|
-
let scaleColor = [];
|
|
205
|
-
if (Array.isArray(colorMap)) {
|
|
206
|
-
colorMap.forEach(([value, color]) => {
|
|
207
|
-
domain.push(value);
|
|
208
|
-
scaleColor.push(color);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
domain = calculateDomain(data, name, scaleType);
|
|
213
|
-
scaleColor = colors;
|
|
214
|
-
}
|
|
215
|
-
if (scaleType === 'ordinal') {
|
|
216
|
-
domain = domain.slice(0, scaleColor.length);
|
|
217
|
-
}
|
|
218
|
-
scale.domain(domain);
|
|
219
|
-
scale.range(scaleColor);
|
|
220
|
-
scale.unknown(UNKNOWN_COLOR);
|
|
221
|
-
const alpha = opacityToAlpha(opacity);
|
|
222
|
-
const accessor = properties => {
|
|
223
|
-
const propertyValue = properties[name];
|
|
224
|
-
const { r, g, b } = rgb(scale(propertyValue));
|
|
225
|
-
return [r, g, b, propertyValue === null ? 0 : alpha];
|
|
226
|
-
};
|
|
227
|
-
return normalizeAccessor(accessor, data);
|
|
228
|
-
}
|
|
229
|
-
export function getSizeAccessor({ name }, scaleType, range, data) {
|
|
230
|
-
const scale = SCALE_FUNCS[scaleType]();
|
|
231
|
-
scale.domain(calculateDomain(data, name, scaleType));
|
|
232
|
-
scale.range(range);
|
|
233
|
-
const accessor = properties => {
|
|
234
|
-
return scale(properties[name]);
|
|
235
|
-
};
|
|
236
|
-
return normalizeAccessor(accessor, data);
|
|
237
|
-
}
|
|
238
|
-
const FORMATS = {
|
|
239
|
-
date: s => moment.utc(s).format('MM/DD/YY HH:mm:ssa'),
|
|
240
|
-
integer: d3Format('i'),
|
|
241
|
-
float: d3Format('.5f'),
|
|
242
|
-
timestamp: s => moment.utc(s).format('X'),
|
|
243
|
-
default: String
|
|
244
|
-
};
|
|
245
|
-
export function getTextAccessor({ name, type }, data) {
|
|
246
|
-
const format = FORMATS[type] || FORMATS.default;
|
|
247
|
-
const accessor = properties => {
|
|
248
|
-
return format(properties[name]);
|
|
249
|
-
};
|
|
250
|
-
return normalizeAccessor(accessor, data);
|
|
251
|
-
}
|
|
252
|
-
export function getTextPixelOffsetAccessor({ alignment, anchor, size }, radius) {
|
|
253
|
-
const padding = 20;
|
|
254
|
-
const signX = anchor === 'middle' ? 0 : anchor === 'start' ? 1 : -1;
|
|
255
|
-
const signY = alignment === 'center' ? 0 : alignment === 'bottom' ? 1 : -1;
|
|
256
|
-
const sizeOffset = alignment === 'center' ? 0 : size;
|
|
257
|
-
const calculateOffset = r => [signX * (r + padding), signY * (r + padding + sizeOffset)];
|
|
258
|
-
return typeof radius === 'function'
|
|
259
|
-
? d => {
|
|
260
|
-
return calculateOffset(radius(d));
|
|
261
|
-
}
|
|
262
|
-
: calculateOffset(radius);
|
|
263
|
-
}
|
|
264
|
-
export { domainFromValues as _domainFromValues };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_USER_COMPONENT_IN_URL = '{user}';
|
|
2
|
-
export const DEFAULT_REGION_COMPONENT_IN_URL = '{region}';
|
|
3
|
-
export const API_VERSIONS = {
|
|
4
|
-
V1: 'v1',
|
|
5
|
-
V2: 'v2',
|
|
6
|
-
V3: 'v3'
|
|
7
|
-
};
|
|
8
|
-
export const DEFAULT_MAPS_URL_FORMAT = {
|
|
9
|
-
[API_VERSIONS.V1]: `https://${DEFAULT_USER_COMPONENT_IN_URL}.carto.com/api/v1/map`,
|
|
10
|
-
[API_VERSIONS.V2]: `https://maps-api-v2.${DEFAULT_REGION_COMPONENT_IN_URL}.carto.com/user/${DEFAULT_USER_COMPONENT_IN_URL}`
|
|
11
|
-
};
|
|
12
|
-
export const MAP_TYPES = {
|
|
13
|
-
QUERY: 'query',
|
|
14
|
-
TABLE: 'table',
|
|
15
|
-
TILESET: 'tileset'
|
|
16
|
-
};
|
|
17
|
-
export const COLUMNS_SUPPORT = [MAP_TYPES.TABLE];
|
|
18
|
-
export const GEO_COLUMN_SUPPORT = [MAP_TYPES.QUERY, MAP_TYPES.TABLE];
|
|
19
|
-
// AVAILABLE FORMATS
|
|
20
|
-
export const FORMATS = {
|
|
21
|
-
GEOJSON: 'geojson',
|
|
22
|
-
NDJSON: 'ndjson',
|
|
23
|
-
TILEJSON: 'tilejson',
|
|
24
|
-
JSON: 'json'
|
|
25
|
-
};
|
|
26
|
-
// AVAILABLE FORMATS FOR TILES
|
|
27
|
-
export const TILE_FORMATS = {
|
|
28
|
-
MVT: 'mvt',
|
|
29
|
-
JSON: 'json',
|
|
30
|
-
GEOJSON: 'geojson',
|
|
31
|
-
BINARY: 'binary'
|
|
32
|
-
};
|
|
33
|
-
export var SchemaFieldType;
|
|
34
|
-
(function (SchemaFieldType) {
|
|
35
|
-
SchemaFieldType["Number"] = "number";
|
|
36
|
-
SchemaFieldType["Bigint"] = "bigint";
|
|
37
|
-
SchemaFieldType["String"] = "string";
|
|
38
|
-
SchemaFieldType["Geometry"] = "geometry";
|
|
39
|
-
SchemaFieldType["Timestamp"] = "timestamp";
|
|
40
|
-
SchemaFieldType["Object"] = "object";
|
|
41
|
-
SchemaFieldType["Boolean"] = "boolean";
|
|
42
|
-
SchemaFieldType["Variant"] = "variant";
|
|
43
|
-
SchemaFieldType["Unknown"] = "unknown";
|
|
44
|
-
})(SchemaFieldType || (SchemaFieldType = {}));
|
|
45
|
-
/**
|
|
46
|
-
* Simple encode parameter
|
|
47
|
-
*/
|
|
48
|
-
export function encodeParameter(name, value) {
|
|
49
|
-
return `${name}=${encodeURIComponent(value)}`;
|
|
50
|
-
}
|