@loaders.gl/mvt 4.3.0-alpha.8 → 4.3.0-beta.2
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/dist.dev.js +271 -414
- package/dist/dist.min.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +2 -2
- package/dist/lib/parse-mvt.d.ts +1 -2
- package/dist/lib/parse-mvt.d.ts.map +1 -1
- package/dist/lib/vector-tile/vector-tile-feature.d.ts +1 -2
- package/dist/lib/vector-tile/vector-tile-feature.d.ts.map +1 -1
- package/dist/lib/vector-tile/vector-tile-feature.js +1 -3
- package/dist/lib/vector-tiler/tile-to-geojson.d.ts.map +1 -1
- package/dist/lib/vector-tiler/tile-to-geojson.js +1 -2
- package/dist/mvt-loader.d.ts.map +1 -1
- package/dist/mvt-loader.js +1 -1
- package/dist/mvt-source.d.ts +1 -3
- package/dist/mvt-source.d.ts.map +1 -1
- package/dist/mvt-worker.js +80 -223
- package/dist/table-tile-source.d.ts +1 -1
- package/dist/table-tile-source.d.ts.map +1 -1
- package/dist/tilejson-loader.js +1 -1
- package/package.json +6 -6
- package/src/lib/parse-mvt.ts +7 -2
- package/src/lib/vector-tile/vector-tile-feature.ts +15 -5
- package/src/lib/vector-tiler/tile-to-geojson.ts +1 -2
- package/src/mvt-source.ts +9 -4
- package/src/table-tile-source.ts +8 -4
package/dist/tilejson-loader.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { parseTileJSON } from "./lib/parse-tilejson.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "4.3.0-
|
|
7
|
+
const VERSION = typeof "4.3.0-beta.1" !== 'undefined' ? "4.3.0-beta.1" : 'latest';
|
|
8
8
|
/**
|
|
9
9
|
* Loader for TileJSON metadata
|
|
10
10
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/mvt",
|
|
3
3
|
"description": "Loader for Mapbox Vector Tiles",
|
|
4
|
-
"version": "4.3.0-
|
|
4
|
+
"version": "4.3.0-beta.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"publishConfig": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"build-worker": "esbuild src/workers/mvt-worker.ts --bundle --outfile=dist/mvt-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@loaders.gl/gis": "4.3.0-
|
|
48
|
-
"@loaders.gl/images": "4.3.0-
|
|
49
|
-
"@loaders.gl/loader-utils": "4.3.0-
|
|
50
|
-
"@loaders.gl/schema": "4.3.0-
|
|
47
|
+
"@loaders.gl/gis": "4.3.0-beta.2",
|
|
48
|
+
"@loaders.gl/images": "4.3.0-beta.2",
|
|
49
|
+
"@loaders.gl/loader-utils": "4.3.0-beta.2",
|
|
50
|
+
"@loaders.gl/schema": "4.3.0-beta.2",
|
|
51
51
|
"@math.gl/polygon": "^4.1.0",
|
|
52
52
|
"@probe.gl/stats": "^4.0.0",
|
|
53
53
|
"pbf": "^3.2.1"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@loaders.gl/core": "^4.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "a61003f2bb56acbdaef07a03bc39d4c7830afdcc"
|
|
62
62
|
}
|
package/src/lib/parse-mvt.ts
CHANGED
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
|
|
5
|
+
import type {
|
|
6
|
+
FlatFeature,
|
|
7
|
+
Feature,
|
|
8
|
+
GeojsonGeometryInfo,
|
|
9
|
+
GeoJSONTable,
|
|
10
|
+
BinaryFeatureCollection
|
|
11
|
+
} from '@loaders.gl/schema';
|
|
7
12
|
import {flatGeojsonToBinary} from '@loaders.gl/gis';
|
|
8
13
|
import {log} from '@loaders.gl/loader-utils';
|
|
9
14
|
import Protobuf from 'pbf';
|
|
@@ -3,12 +3,22 @@
|
|
|
3
3
|
// Copyright vis.gl contributors
|
|
4
4
|
|
|
5
5
|
// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.
|
|
6
|
-
|
|
7
|
-
import {
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
Feature,
|
|
9
|
+
FlatFeature,
|
|
10
|
+
FlatIndexedGeometry,
|
|
11
|
+
GeojsonGeometryInfo
|
|
12
|
+
} from '@loaders.gl/schema';
|
|
8
13
|
import Protobuf from 'pbf';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
import {
|
|
15
|
+
classifyRings,
|
|
16
|
+
classifyRingsFlat,
|
|
17
|
+
projectToLngLat,
|
|
18
|
+
projectToLngLatFlat,
|
|
19
|
+
convertToLocalCoordinates,
|
|
20
|
+
convertToLocalCoordinatesFlat
|
|
21
|
+
} from '../utils/geometry-utils';
|
|
12
22
|
|
|
13
23
|
export class VectorTileFeature {
|
|
14
24
|
properties: {[x: string]: string | number | boolean | null};
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
import {ProtoTile} from './proto-tile';
|
|
7
7
|
import {Feature, GeoJSONTable} from '@loaders.gl/schema';
|
|
8
8
|
|
|
9
|
-
import {projectToLngLat} from '../utils/geometry-utils';
|
|
10
|
-
import {convertToLocalCoordinates} from '../utils/geometry-utils';
|
|
9
|
+
import {projectToLngLat, convertToLocalCoordinates} from '../utils/geometry-utils';
|
|
11
10
|
|
|
12
11
|
// eslint-disable-next-line max-statements, complexity
|
|
13
12
|
export function convertTileToGeoJSON(
|
package/src/mvt-source.ts
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import type {
|
|
6
|
+
Source,
|
|
7
|
+
ImageType,
|
|
8
|
+
DataSourceProps,
|
|
9
|
+
ImageTileSource,
|
|
10
|
+
VectorTileSource,
|
|
11
|
+
GetTileParameters,
|
|
12
|
+
GetTileDataParameters
|
|
13
|
+
} from '@loaders.gl/loader-utils';
|
|
9
14
|
import {DataSource, resolvePath} from '@loaders.gl/loader-utils';
|
|
10
15
|
import {ImageLoader, ImageLoaderOptions, getBinaryImageMetadata} from '@loaders.gl/images';
|
|
11
16
|
import {
|
package/src/table-tile-source.ts
CHANGED
|
@@ -3,16 +3,20 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
// Based on https://github.com/mapbox/geojson-vt under compatible ISC license
|
|
5
5
|
|
|
6
|
-
import {Source} from '@loaders.gl/loader-utils';
|
|
6
|
+
import {Source, VectorTileSource, TileSourceMetadata, log} from '@loaders.gl/loader-utils';
|
|
7
7
|
import type {
|
|
8
8
|
VectorTileSourceProps,
|
|
9
9
|
GetTileDataParameters,
|
|
10
10
|
GetTileParameters,
|
|
11
11
|
LoaderWithParser
|
|
12
12
|
} from '@loaders.gl/loader-utils';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import {
|
|
14
|
+
Schema,
|
|
15
|
+
GeoJSONTable,
|
|
16
|
+
Feature,
|
|
17
|
+
BinaryFeatureCollection,
|
|
18
|
+
deduceTableSchema
|
|
19
|
+
} from '@loaders.gl/schema';
|
|
16
20
|
import {Stats, Stat} from '@probe.gl/stats';
|
|
17
21
|
|
|
18
22
|
import type {ProtoFeature} from './lib/vector-tiler/features/proto-feature';
|