@deck.gl/carto 8.10.0-alpha.6 → 8.10.0-alpha.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/dist/cartoRasterTile-worker.js +7 -7
- package/dist/cartoSpatialTile-worker.js +7 -7
- package/dist/cartoVectorTile-worker.js +7 -7
- package/dist/dist.dev.js +8 -22
- package/dist/es5/layers/schema/carto-raster-tile-loader.js +1 -1
- package/dist/es5/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/es5/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist/es5/layers/schema/carto-vector-tile-loader.js.map +1 -1
- package/dist/es5/layers/vector-tile-layer.js.map +1 -1
- package/dist/esm/layers/schema/carto-raster-tile-loader.js +1 -1
- package/dist/esm/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/esm/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist/esm/layers/schema/carto-vector-tile-loader.js.map +1 -1
- package/dist/esm/layers/vector-tile-layer.js.map +1 -1
- package/dist.min.js +40 -45
- package/package.json +9 -9
- package/src/layers/schema/carto-vector-tile-loader.ts +4 -4
- package/src/layers/vector-tile-layer.ts +2 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl/carto",
|
|
3
3
|
"description": "CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "8.10.0-alpha.
|
|
5
|
+
"version": "8.10.0-alpha.7",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.0.0",
|
|
38
|
-
"@loaders.gl/gis": "^
|
|
39
|
-
"@loaders.gl/loader-utils": "^
|
|
40
|
-
"@loaders.gl/mvt": "^
|
|
41
|
-
"@loaders.gl/tiles": "^
|
|
38
|
+
"@loaders.gl/gis": "^4.0.1",
|
|
39
|
+
"@loaders.gl/loader-utils": "^4.0.1",
|
|
40
|
+
"@loaders.gl/mvt": "^4.0.1",
|
|
41
|
+
"@loaders.gl/tiles": "^4.0.1",
|
|
42
42
|
"@luma.gl/constants": "^8.5.20",
|
|
43
|
-
"@math.gl/web-mercator": "^
|
|
43
|
+
"@math.gl/web-mercator": "^4.0.0",
|
|
44
44
|
"cartocolor": "^4.0.2",
|
|
45
45
|
"d3-array": "^3.2.0",
|
|
46
46
|
"d3-color": "^3.1.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"quadbin": "^0.1.9"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@loaders.gl/schema": "^
|
|
55
|
+
"@loaders.gl/schema": "^4.0.1",
|
|
56
56
|
"@types/d3-array": "^3.0.2",
|
|
57
57
|
"@types/d3-color": "^1.4.2",
|
|
58
58
|
"@types/d3-scale": "^3.0.0"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@deck.gl/extensions": "^8.0.0",
|
|
64
64
|
"@deck.gl/geo-layers": "^8.0.0",
|
|
65
65
|
"@deck.gl/layers": "^8.0.0",
|
|
66
|
-
"@loaders.gl/core": "^
|
|
66
|
+
"@loaders.gl/core": "^4.0.1"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "1c62a9eec914019afd3969bc0c59f1488e491207"
|
|
69
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import earcut from 'earcut';
|
|
2
2
|
import {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
|
|
3
|
-
import type {
|
|
3
|
+
import type {BinaryFeatureCollection, BinaryPolygonFeature, TypedArray} from '@loaders.gl/schema';
|
|
4
4
|
|
|
5
5
|
import {TileReader} from './carto-tile';
|
|
6
6
|
import {parsePbf} from './tile-loader-utils';
|
|
@@ -37,7 +37,7 @@ const CartoVectorTileLoader: LoaderWithParser = {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
function triangulatePolygon(
|
|
40
|
-
polygons:
|
|
40
|
+
polygons: BinaryPolygonFeature,
|
|
41
41
|
target: number[],
|
|
42
42
|
{
|
|
43
43
|
startPosition,
|
|
@@ -65,7 +65,7 @@ function triangulatePolygon(
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
function triangulate(polygons:
|
|
68
|
+
function triangulate(polygons: BinaryPolygonFeature) {
|
|
69
69
|
const {polygonIndices, positions, primitivePolygonIndices} = polygons;
|
|
70
70
|
const triangles = [];
|
|
71
71
|
|
|
@@ -88,7 +88,7 @@ function triangulate(polygons: BinaryPolygonFeatures) {
|
|
|
88
88
|
function parseCartoVectorTile(
|
|
89
89
|
arrayBuffer: ArrayBuffer,
|
|
90
90
|
options?: CartoVectorTileLoaderOptions
|
|
91
|
-
):
|
|
91
|
+
): BinaryFeatureCollection | null {
|
|
92
92
|
if (!arrayBuffer) return null;
|
|
93
93
|
const tile = parsePbf(arrayBuffer, TileReader);
|
|
94
94
|
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '@deck.gl/geo-layers';
|
|
15
15
|
import {GeoJsonLayer} from '@deck.gl/layers';
|
|
16
16
|
import {binaryToGeojson} from '@loaders.gl/gis';
|
|
17
|
-
import type {
|
|
17
|
+
import type {BinaryFeatureCollection} from '@loaders.gl/schema';
|
|
18
18
|
import {TileFormat, TILE_FORMATS} from '../api/maps-api-common';
|
|
19
19
|
import type {Feature} from 'geojson';
|
|
20
20
|
import {TilejsonPropType, CartoTilejsonResult} from '../sources/common';
|
|
@@ -123,7 +123,7 @@ export default class VectorTileLayer<ExtraProps extends {} = {}> extends MVTLaye
|
|
|
123
123
|
|
|
124
124
|
if (this.state.binary && info.index !== -1) {
|
|
125
125
|
const {data} = params.sourceLayer!.props;
|
|
126
|
-
info.object = binaryToGeojson(data as
|
|
126
|
+
info.object = binaryToGeojson(data as BinaryFeatureCollection, {
|
|
127
127
|
globalFeatureId: info.index
|
|
128
128
|
}) as Feature;
|
|
129
129
|
}
|