@deck.gl/carto 9.1.1 → 9.1.3
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/cartoPropertiesTile-worker.js +5559 -0
- package/dist/cartoRasterTile-worker.js +1 -1
- package/dist/cartoSpatialTile-worker.js +1 -1
- package/dist/cartoVectorTile-worker.js +1 -1
- package/dist/dist.dev.js +52 -45
- package/dist/index.cjs +44 -37
- package/dist/index.cjs.map +3 -3
- package/dist/layers/heatmap-tile-layer.js +1 -1
- package/dist/layers/heatmap-tile-layer.js.map +1 -1
- package/dist/layers/schema/carto-properties-tile-loader.d.ts.map +1 -1
- package/dist/layers/schema/carto-properties-tile-loader.js +11 -3
- package/dist/layers/schema/carto-properties-tile-loader.js.map +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.js +1 -1
- package/dist/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist/workers/cartoPropertiesTile.d.ts +2 -0
- package/dist/workers/cartoPropertiesTile.d.ts.map +1 -0
- package/dist/workers/cartoPropertiesTile.js +7 -0
- package/dist/workers/cartoPropertiesTile.js.map +1 -0
- package/dist.min.js +10 -10
- package/package.json +3 -3
- package/src/layers/heatmap-tile-layer.ts +1 -1
- package/src/layers/schema/carto-properties-tile-loader.ts +19 -3
- package/src/workers/cartoPropertiesTile.ts +8 -0
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.1.
|
|
6
|
+
"version": "9.1.3",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build-bundle": "npm run build-workers && ocular-bundle ./bundle.ts",
|
|
40
|
-
"build-workers": "npm run build-worker --cartoloader=RasterTile && npm run build-worker --cartoloader=SpatialTile && npm run build-worker --cartoloader=VectorTile",
|
|
40
|
+
"build-workers": "npm run build-worker --cartoloader=RasterTile && npm run build-worker --cartoloader=SpatialTile && npm run build-worker --cartoloader=VectorTile && npm run build-worker --cartoloader=PropertiesTile",
|
|
41
41
|
"build-worker": "esbuild src/workers/carto$npm_config_cartoloader.ts --bundle --outfile=dist/carto$npm_config_cartoloader-worker.js --define:__VERSION__=\\\"$npm_package_version\\\"",
|
|
42
42
|
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
|
|
43
43
|
},
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"@loaders.gl/core": "^4.2.0",
|
|
76
76
|
"@luma.gl/core": "^9.1.0"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "bcfeb6dbc37a3fa080837411be499cfb98681e98"
|
|
79
79
|
}
|
|
@@ -322,7 +322,7 @@ class HeatmapTileLayer<DataT = any, ExtraProps extends {} = {}> extends Composit
|
|
|
322
322
|
|
|
323
323
|
if (colorTexture && colorTexture?.width === colorRange.length) {
|
|
324
324
|
// TODO(v9): Unclear whether `setSubImageData` is a public API, or what to use if not.
|
|
325
|
-
(colorTexture as any).
|
|
325
|
+
(colorTexture as any).setTexture2DData({data: colors});
|
|
326
326
|
} else {
|
|
327
327
|
colorTexture?.destroy();
|
|
328
328
|
// @ts-ignore TODO v9.1
|
|
@@ -6,11 +6,27 @@ import {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
|
|
|
6
6
|
|
|
7
7
|
import {Tile, TileReader} from './carto-properties-tile';
|
|
8
8
|
import {parsePbf} from './tile-loader-utils';
|
|
9
|
+
import {getWorkerUrl} from '../../utils';
|
|
10
|
+
|
|
11
|
+
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
12
|
+
const id = 'cartoPropertiesTile';
|
|
13
|
+
|
|
14
|
+
type CartoPropertiesTileLoaderOptions = LoaderOptions & {
|
|
15
|
+
cartoPropertiesTile?: {
|
|
16
|
+
workerUrl: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const DEFAULT_OPTIONS: CartoPropertiesTileLoaderOptions = {
|
|
21
|
+
cartoPropertiesTile: {
|
|
22
|
+
workerUrl: getWorkerUrl(id, VERSION)
|
|
23
|
+
}
|
|
24
|
+
};
|
|
9
25
|
|
|
10
26
|
const CartoPropertiesTileLoader: LoaderWithParser = {
|
|
11
27
|
name: 'CARTO Properties Tile',
|
|
12
|
-
version:
|
|
13
|
-
id
|
|
28
|
+
version: VERSION,
|
|
29
|
+
id,
|
|
14
30
|
module: 'carto',
|
|
15
31
|
extensions: ['pbf'],
|
|
16
32
|
mimeTypes: ['application/vnd.carto-properties-tile'],
|
|
@@ -18,7 +34,7 @@ const CartoPropertiesTileLoader: LoaderWithParser = {
|
|
|
18
34
|
worker: true,
|
|
19
35
|
parse: async (arrayBuffer, options) => parseCartoPropertiesTile(arrayBuffer, options),
|
|
20
36
|
parseSync: parseCartoPropertiesTile,
|
|
21
|
-
options:
|
|
37
|
+
options: DEFAULT_OPTIONS
|
|
22
38
|
};
|
|
23
39
|
|
|
24
40
|
function parseCartoPropertiesTile(arrayBuffer: ArrayBuffer, options?: LoaderOptions): Tile | null {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// deck.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import {createLoaderWorker} from '@loaders.gl/loader-utils';
|
|
6
|
+
import CartoPropertiesTileLoader from '../layers/schema/carto-properties-tile-loader';
|
|
7
|
+
|
|
8
|
+
createLoaderWorker(CartoPropertiesTileLoader);
|