@deck.gl/carto 9.0.18 → 9.0.20
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/parse-map.js +9 -5
- 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 +11 -657
- package/dist/index.cjs +14 -10
- package/dist/index.cjs.map +3 -3
- package/dist/layers/heatmap-tile-layer.js +2 -2
- 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.min.js +4 -4
- package/package.json +2 -3
- package/src/api/parse-map.ts +11 -6
- package/src/layers/heatmap-tile-layer.ts +2 -2
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.
|
|
6
|
+
"version": "9.0.20",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"@loaders.gl/mvt": "^4.2.0",
|
|
48
48
|
"@loaders.gl/schema": "^4.2.0",
|
|
49
49
|
"@loaders.gl/tiles": "^4.2.0",
|
|
50
|
-
"@luma.gl/constants": "^9.0.14",
|
|
51
50
|
"@luma.gl/core": "^9.0.14",
|
|
52
51
|
"@luma.gl/shadertools": "^9.0.14",
|
|
53
52
|
"@math.gl/web-mercator": "^4.0.0",
|
|
@@ -73,5 +72,5 @@
|
|
|
73
72
|
"@deck.gl/layers": "^9.0.0",
|
|
74
73
|
"@loaders.gl/core": "^4.2.0"
|
|
75
74
|
},
|
|
76
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "f3c26e0ba9236ae9a12fc2656ac7c4931d21b138"
|
|
77
76
|
}
|
package/src/api/parse-map.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ColorParameters} from '@luma.gl/core';
|
|
2
2
|
import {Layer, log} from '@deck.gl/core';
|
|
3
3
|
import {
|
|
4
4
|
AGGREGATION,
|
|
@@ -83,13 +83,18 @@ export function parseMap(json) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function createParametersProp(layerBlending, parameters:
|
|
86
|
+
function createParametersProp(layerBlending: string, parameters: ColorParameters) {
|
|
87
87
|
if (layerBlending === 'additive') {
|
|
88
|
-
parameters.
|
|
89
|
-
parameters.
|
|
88
|
+
parameters.blendColorSrcFactor = parameters.blendAlphaSrcFactor = 'src-alpha';
|
|
89
|
+
parameters.blendColorDstFactor = parameters.blendAlphaDstFactor = 'dst-alpha';
|
|
90
|
+
parameters.blendColorOperation = parameters.blendAlphaOperation = 'add';
|
|
90
91
|
} else if (layerBlending === 'subtractive') {
|
|
91
|
-
parameters.
|
|
92
|
-
parameters.
|
|
92
|
+
parameters.blendColorSrcFactor = 'one';
|
|
93
|
+
parameters.blendColorDstFactor = 'one-minus-dst-color';
|
|
94
|
+
parameters.blendAlphaSrcFactor = 'src-alpha';
|
|
95
|
+
parameters.blendAlphaDstFactor = 'dst-alpha';
|
|
96
|
+
parameters.blendColorOperation = 'subtract';
|
|
97
|
+
parameters.blendAlphaOperation = 'add';
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
return Object.keys(parameters).length ? {parameters} : {};
|
|
@@ -153,9 +153,9 @@ class HeatmapTileLayer<DataT = any, ExtraProps extends {} = {}> extends Composit
|
|
|
153
153
|
|
|
154
154
|
let tileZ = 0;
|
|
155
155
|
let maxDensity = 0;
|
|
156
|
-
const tiles = [...this.state.tiles].filter(t => t.isVisible && t.
|
|
156
|
+
const tiles = [...this.state.tiles].filter(t => t.isVisible && t.content);
|
|
157
157
|
for (const tile of tiles) {
|
|
158
|
-
const cell = tile.
|
|
158
|
+
const cell = tile.content[0];
|
|
159
159
|
const unitDensity = unitDensityForCell(cell.id);
|
|
160
160
|
maxDensity = Math.max(tile.userData!.maxWeight * unitDensity, maxDensity);
|
|
161
161
|
tileZ = Math.max(tile.zoom, tileZ);
|