@deck.gl/carto 9.0.0-beta.5 → 9.0.0-beta.7

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "9.0.0-beta.5",
6
+ "version": "9.0.0-beta.7",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -42,37 +42,35 @@
42
42
  "prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
43
43
  },
44
44
  "dependencies": {
45
- "@babel/runtime": "^7.0.0",
46
45
  "@loaders.gl/gis": "^4.1.0",
47
46
  "@loaders.gl/loader-utils": "^4.1.0",
48
47
  "@loaders.gl/mvt": "^4.1.0",
48
+ "@loaders.gl/schema": "^4.1.0",
49
49
  "@loaders.gl/tiles": "^4.1.0",
50
- "@luma.gl/constants": "9.0.0-beta.4",
51
- "@luma.gl/core": "9.0.0-beta.4",
50
+ "@luma.gl/constants": "9.0.0-beta.8",
52
51
  "@math.gl/web-mercator": "^4.0.0",
52
+ "@types/d3-array": "^3.0.2",
53
+ "@types/d3-color": "^1.4.2",
54
+ "@types/d3-scale": "^3.0.0",
53
55
  "cartocolor": "^4.0.2",
54
56
  "d3-array": "^3.2.0",
55
57
  "d3-color": "^3.1.0",
56
58
  "d3-format": "^3.1.0",
57
59
  "d3-scale": "^4.0.0",
60
+ "earcut": "^2.2.4",
58
61
  "h3-js": "^4.1.0",
59
62
  "moment-timezone": "^0.5.33",
60
63
  "pbf": "^3.2.1",
61
64
  "quadbin": "^0.2.0"
62
65
  },
63
- "devDependencies": {
64
- "@loaders.gl/schema": "^4.1.0",
65
- "@types/d3-array": "^3.0.2",
66
- "@types/d3-color": "^1.4.2",
67
- "@types/d3-scale": "^3.0.0"
68
- },
69
66
  "peerDependencies": {
70
- "@deck.gl/aggregation-layers": "^9.0.0-alpha",
71
- "@deck.gl/core": "^9.0.0-alpha",
72
- "@deck.gl/extensions": "^9.0.0-alpha",
73
- "@deck.gl/geo-layers": "^9.0.0-alpha",
74
- "@deck.gl/layers": "^9.0.0-alpha",
75
- "@loaders.gl/core": "^4.1.0"
67
+ "@deck.gl/aggregation-layers": "^9.0.0-beta",
68
+ "@deck.gl/core": "^9.0.0-beta",
69
+ "@deck.gl/extensions": "^9.0.0-beta",
70
+ "@deck.gl/geo-layers": "^9.0.0-beta",
71
+ "@deck.gl/layers": "^9.0.0-beta",
72
+ "@loaders.gl/core": "^4.1.0",
73
+ "@luma.gl/core": "9.0.0-beta.8"
76
74
  },
77
- "gitHead": "02588aba7cbf25d48cec20b30a686bba9be32bff"
75
+ "gitHead": "1676f8d6f7534259996bf58a7b7e1fba6f3af9ae"
78
76
  }
package/src/api/common.ts CHANGED
@@ -4,7 +4,6 @@ export const V3_MINOR_VERSION = '3.3';
4
4
  export const MAX_GET_LENGTH = 8192;
5
5
 
6
6
  export const DEFAULT_PARAMETERS = {
7
- client: DEFAULT_CLIENT,
8
7
  v: V3_MINOR_VERSION
9
8
  };
10
9
 
@@ -125,8 +125,12 @@ async function _fetchTilestats(
125
125
  }
126
126
 
127
127
  const baseUrl = buildStatsUrl({attribute, apiBaseUrl, ...dataset});
128
+ const client = new URLSearchParams(data.tiles[0]).get('client');
128
129
  const headers = {Authorization: `Bearer ${accessToken}`};
129
130
  const parameters: Record<string, string> = {};
131
+ if (client) {
132
+ parameters.client = client;
133
+ }
130
134
  if (type === 'query') {
131
135
  parameters.q = source;
132
136
  if (queryParameters) {
@@ -1,4 +1,3 @@
1
- import {GL} from '@luma.gl/constants';
2
1
  import {
3
2
  Accessor,
4
3
  CompositeLayer,
@@ -48,16 +47,14 @@ class RasterColumnLayer extends ColumnLayer {
48
47
  },
49
48
  instanceFillColors: {
50
49
  size: this.props.colorFormat.length,
51
- type: GL.UNSIGNED_BYTE,
52
- normalized: true,
50
+ type: 'unorm8',
53
51
  transition: true,
54
52
  accessor: 'getFillColor',
55
53
  defaultValue: [0, 0, 0, 255]
56
54
  },
57
55
  instanceLineColors: {
58
56
  size: this.props.colorFormat.length,
59
- type: GL.UNSIGNED_BYTE,
60
- normalized: true,
57
+ type: 'unorm8',
61
58
  transition: true,
62
59
  accessor: 'getLineColor',
63
60
  defaultValue: [255, 255, 255, 255]
@@ -32,18 +32,19 @@ export async function baseSource<UrlParameters extends Record<string, string>>(
32
32
  }
33
33
  }
34
34
  const baseUrl = buildSourceUrl(mergedOptions);
35
- const {format} = mergedOptions;
35
+ const {clientId, format} = mergedOptions;
36
36
  const headers = {Authorization: `Bearer ${options.accessToken}`, ...options.headers};
37
+ const parameters = {client: clientId, ...urlParameters};
37
38
 
38
39
  const errorContext: APIErrorContext = {
39
40
  requestType: 'Map instantiation',
40
41
  connection: options.connectionName,
41
42
  type: endpoint,
42
- source: JSON.stringify(urlParameters, undefined, 2)
43
+ source: JSON.stringify(parameters, undefined, 2)
43
44
  };
44
45
  const mapInstantiation = await requestWithParameters<TilejsonMapInstantiation>({
45
46
  baseUrl,
46
- parameters: urlParameters,
47
+ parameters,
47
48
  headers,
48
49
  errorContext
49
50
  });
@@ -61,7 +61,7 @@ export type FilterOptions = {
61
61
  /**
62
62
  * Filters to apply to the data source on the server
63
63
  */
64
- filters: Filters;
64
+ filters?: Filters;
65
65
  };
66
66
 
67
67
  export type QuerySourceOptions = {