@deck.gl/carto 9.1.5 → 9.1.6
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.d.ts.map +1 -1
- package/dist/api/parse-map.js +3 -5
- package/dist/api/parse-map.js.map +1 -1
- package/dist/cartoPropertiesTile-worker.js +1 -1
- 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 +15 -4
- package/dist/index.cjs +23 -11
- package/dist/index.cjs.map +3 -3
- package/dist/layers/schema/carto-properties-tile-loader.js +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/layers/vector-tile-layer.d.ts.map +1 -1
- package/dist/layers/vector-tile-layer.js +14 -1
- package/dist/layers/vector-tile-layer.js.map +1 -1
- package/dist.min.js +10 -10
- package/package.json +5 -5
- package/src/api/parse-map.ts +3 -6
- package/src/layers/vector-tile-layer.ts +15 -1
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.6",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@loaders.gl/mvt": "^4.2.0",
|
|
50
50
|
"@loaders.gl/schema": "^4.2.0",
|
|
51
51
|
"@loaders.gl/tiles": "^4.2.0",
|
|
52
|
-
"@luma.gl/core": "^9.1.
|
|
53
|
-
"@luma.gl/shadertools": "^9.1.
|
|
52
|
+
"@luma.gl/core": "^9.1.5",
|
|
53
|
+
"@luma.gl/shadertools": "^9.1.5",
|
|
54
54
|
"@math.gl/web-mercator": "^4.1.0",
|
|
55
55
|
"@types/d3-array": "^3.0.2",
|
|
56
56
|
"@types/d3-color": "^1.4.2",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@deck.gl/geo-layers": "^9.1.0",
|
|
74
74
|
"@deck.gl/layers": "^9.1.0",
|
|
75
75
|
"@loaders.gl/core": "^4.2.0",
|
|
76
|
-
"@luma.gl/core": "^9.1.
|
|
76
|
+
"@luma.gl/core": "^9.1.5"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "f550580cbd6f32b158771641868e1b7c2165440b"
|
|
79
79
|
}
|
package/src/api/parse-map.ts
CHANGED
|
@@ -17,13 +17,9 @@ import {
|
|
|
17
17
|
negateAccessor,
|
|
18
18
|
getMaxMarkerSize
|
|
19
19
|
} from './layer-map';
|
|
20
|
-
import PointLabelLayer from '../layers/point-label-layer';
|
|
21
|
-
import {CollisionFilterExtension} from '@deck.gl/extensions';
|
|
22
20
|
import {assert} from '../utils';
|
|
23
21
|
import {KeplerMapConfig, MapDataset, MapLayerConfig, VisualChannels} from './types';
|
|
24
22
|
|
|
25
|
-
const collisionFilterExtension = new CollisionFilterExtension();
|
|
26
|
-
|
|
27
23
|
export type ParseMapResult = {
|
|
28
24
|
/** Map id. */
|
|
29
25
|
id: string;
|
|
@@ -343,8 +339,9 @@ function createChannelProps(
|
|
|
343
339
|
result._subLayerProps = {
|
|
344
340
|
...result._subLayerProps,
|
|
345
341
|
'points-text': {
|
|
346
|
-
|
|
347
|
-
|
|
342
|
+
// The following props are injected by default by VectorTileLayer:
|
|
343
|
+
// type: PointLabelLayer,
|
|
344
|
+
// extensions: [new CollisionFilterExtension()],
|
|
348
345
|
collisionEnabled: true,
|
|
349
346
|
collisionGroup,
|
|
350
347
|
|
|
@@ -8,7 +8,7 @@ import CartoVectorTileLoader from './schema/carto-vector-tile-loader';
|
|
|
8
8
|
registerLoaders([CartoPropertiesTileLoader, CartoVectorTileLoader]);
|
|
9
9
|
|
|
10
10
|
import {DefaultProps} from '@deck.gl/core';
|
|
11
|
-
import {ClipExtension} from '@deck.gl/extensions';
|
|
11
|
+
import {ClipExtension, CollisionFilterExtension} from '@deck.gl/extensions';
|
|
12
12
|
import {
|
|
13
13
|
MVTLayer,
|
|
14
14
|
MVTLayerProps,
|
|
@@ -22,6 +22,7 @@ import {GeoJsonLayer} from '@deck.gl/layers';
|
|
|
22
22
|
import type {TilejsonResult} from '@carto/api-client';
|
|
23
23
|
import {TilejsonPropType, injectAccessToken, mergeBoundaryData} from './utils';
|
|
24
24
|
import {DEFAULT_TILE_SIZE} from '../constants';
|
|
25
|
+
import PointLabelLayer from './point-label-layer';
|
|
25
26
|
|
|
26
27
|
const defaultProps: DefaultProps<VectorTileLayerProps> = {
|
|
27
28
|
...MVTLayer.defaultProps,
|
|
@@ -153,12 +154,25 @@ export default class VectorTileLayer<
|
|
|
153
154
|
};
|
|
154
155
|
};
|
|
155
156
|
|
|
157
|
+
const defaultToPointLabelLayer = {
|
|
158
|
+
'points-text': {
|
|
159
|
+
type: PointLabelLayer,
|
|
160
|
+
...props?._subLayerProps?.['points-text'],
|
|
161
|
+
extensions: [
|
|
162
|
+
new CollisionFilterExtension(),
|
|
163
|
+
...(props.extensions || []),
|
|
164
|
+
...(props?._subLayerProps?.['points-text']?.extensions || [])
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
156
169
|
const subLayerProps = {
|
|
157
170
|
...props,
|
|
158
171
|
autoHighlight: false,
|
|
159
172
|
// Do not perform clipping on points (#9059)
|
|
160
173
|
_subLayerProps: {
|
|
161
174
|
...props._subLayerProps,
|
|
175
|
+
...defaultToPointLabelLayer,
|
|
162
176
|
...applyClipExtensionToSublayerProps('polygons-fill'),
|
|
163
177
|
...applyClipExtensionToSublayerProps('polygons-stroke'),
|
|
164
178
|
...applyClipExtensionToSublayerProps('linestrings')
|