@loaders.gl/mvt 4.2.0-alpha.5 → 4.2.0-alpha.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.
@@ -12,6 +12,15 @@ export const TEST_EXPORTS = {
12
12
  classifyRings
13
13
  };
14
14
  export default class VectorTileFeature {
15
+ properties;
16
+ extent;
17
+ type;
18
+ id;
19
+ _pbf;
20
+ _geometry;
21
+ _keys;
22
+ _values;
23
+ _geometryInfo;
15
24
  // eslint-disable-next-line max-params
16
25
  constructor(pbf, end, extent, keys, values, geometryInfo) {
17
26
  // Public
@@ -2,6 +2,14 @@
2
2
  // This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.
3
3
  import VectorTileFeature from "./vector-tile-feature.js";
4
4
  export default class VectorTileLayer {
5
+ version;
6
+ name;
7
+ extent;
8
+ length;
9
+ _pbf;
10
+ _keys;
11
+ _values;
12
+ _features;
5
13
  constructor(pbf, end) {
6
14
  // Public
7
15
  this.version = 1;
@@ -1,6 +1,7 @@
1
1
  // This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.
2
2
  import VectorTileLayer from "./vector-tile-layer.js";
3
3
  export default class VectorTile {
4
+ layers;
4
5
  constructor(pbf, end) {
5
6
  this.layers = pbf.readFields(readTile, {}, end);
6
7
  }
@@ -176,6 +176,9 @@ function clipLine(geom, newGeom, k1, k2, axis, isPolygon, trackMetrics) {
176
176
  }
177
177
  }
178
178
  class Slice extends Array {
179
+ size;
180
+ start;
181
+ end;
179
182
  }
180
183
  function newSlice(line) {
181
184
  const slice = [];
@@ -21,12 +21,13 @@ const DEFAULT_OPTIONS = {
21
21
  debug: 0 // logging level (0, 1 or 2)
22
22
  };
23
23
  export class GeoJSONTiler {
24
+ options;
25
+ // tiles and tileCoords are part of the public API
26
+ tiles = {};
27
+ tileCoords = [];
28
+ stats = {};
29
+ total = 0;
24
30
  constructor(data, options) {
25
- // tiles and tileCoords are part of the public API
26
- this.tiles = {};
27
- this.tileCoords = [];
28
- this.stats = {};
29
- this.total = 0;
30
31
  this.options = { ...DEFAULT_OPTIONS, ...options };
31
32
  options = this.options;
32
33
  const debug = options.debug;
@@ -63,6 +63,9 @@ function shiftFeatureCoords(features, offset) {
63
63
  return newFeatures;
64
64
  }
65
65
  class Points extends Array {
66
+ size;
67
+ start;
68
+ end;
66
69
  }
67
70
  /**
68
71
  * Shift the x coordinate of every point
@@ -1,5 +1,13 @@
1
1
  import { readFeature, classifyRings } from "../../helpers/mapbox-util-functions.js";
2
2
  export default class VectorTileFeature {
3
+ properties;
4
+ extent;
5
+ type;
6
+ id;
7
+ _pbf;
8
+ _geometry;
9
+ _keys;
10
+ _values;
3
11
  static get types() {
4
12
  return ['Unknown', 'Point', 'LineString', 'Polygon'];
5
13
  }
@@ -2,6 +2,14 @@
2
2
  // This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.
3
3
  import VectorTileFeature from "./vector-tile-feature.js";
4
4
  export default class VectorTileLayer {
5
+ version;
6
+ name;
7
+ extent;
8
+ length;
9
+ _pbf;
10
+ _keys;
11
+ _values;
12
+ _features;
5
13
  constructor(pbf, end) {
6
14
  // Public
7
15
  this.version = 1;
@@ -1,6 +1,7 @@
1
1
  // This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.
2
2
  import VectorTileLayer from "./vector-tile-layer.js";
3
3
  export default class VectorTile {
4
+ layers;
4
5
  constructor(pbf, end) {
5
6
  this.layers = pbf.readFields(readTile, {}, end);
6
7
  }
@@ -8,7 +8,7 @@
8
8
  import parseMVT from "./lib/parse-mvt.js";
9
9
  // __VERSION__ is injected by babel-plugin-version-inline
10
10
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
11
- const VERSION = typeof "4.2.0-alpha.4" !== 'undefined' ? "4.2.0-alpha.4" : 'latest';
11
+ const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest';
12
12
  /**
13
13
  * Worker loader for the Mapbox Vector Tile format
14
14
  */
@@ -12,11 +12,16 @@ import { MVTLoader, TileJSONLoader } from '@loaders.gl/mvt';
12
12
  * @note Can be either a raster or vector tile source depending on the contents of the PMTiles file.
13
13
  */
14
14
  export class MVTSource extends DataSource {
15
+ props;
16
+ url;
17
+ metadataUrl = null;
18
+ data;
19
+ schema = 'tms';
20
+ metadata;
21
+ extension;
22
+ mimeType = null;
15
23
  constructor(props) {
16
24
  super(props);
17
- this.metadataUrl = null;
18
- this.schema = 'tms';
19
- this.mimeType = null;
20
25
  this.props = props;
21
26
  this.url = resolvePath(props.url);
22
27
  this.metadataUrl =
@@ -1673,6 +1673,14 @@
1673
1673
 
1674
1674
  // src/lib/mapbox-vector-tile/vector-tile-feature.ts
1675
1675
  var VectorTileFeature = class {
1676
+ properties;
1677
+ extent;
1678
+ type;
1679
+ id;
1680
+ _pbf;
1681
+ _geometry;
1682
+ _keys;
1683
+ _values;
1676
1684
  static get types() {
1677
1685
  return ["Unknown", "Point", "LineString", "Polygon"];
1678
1686
  }
@@ -1832,6 +1840,14 @@
1832
1840
 
1833
1841
  // src/lib/mapbox-vector-tile/vector-tile-layer.ts
1834
1842
  var VectorTileLayer = class {
1843
+ version;
1844
+ name;
1845
+ extent;
1846
+ length;
1847
+ _pbf;
1848
+ _keys;
1849
+ _values;
1850
+ _features;
1835
1851
  constructor(pbf, end) {
1836
1852
  this.version = 1;
1837
1853
  this.name = "";
@@ -1886,6 +1902,7 @@
1886
1902
 
1887
1903
  // src/lib/mapbox-vector-tile/vector-tile.ts
1888
1904
  var VectorTile = class {
1905
+ layers;
1889
1906
  constructor(pbf, end) {
1890
1907
  this.layers = pbf.readFields(readTile, {}, end);
1891
1908
  }
@@ -1988,6 +2005,15 @@
1988
2005
  var y;
1989
2006
  var i;
1990
2007
  var VectorTileFeature2 = class {
2008
+ properties;
2009
+ extent;
2010
+ type;
2011
+ id;
2012
+ _pbf;
2013
+ _geometry;
2014
+ _keys;
2015
+ _values;
2016
+ _geometryInfo;
1991
2017
  // eslint-disable-next-line max-params
1992
2018
  constructor(pbf, end, extent, keys, values, geometryInfo) {
1993
2019
  this.properties = {};
@@ -2094,6 +2120,14 @@
2094
2120
 
2095
2121
  // src/lib/binary-vector-tile/vector-tile-layer.ts
2096
2122
  var VectorTileLayer2 = class {
2123
+ version;
2124
+ name;
2125
+ extent;
2126
+ length;
2127
+ _pbf;
2128
+ _keys;
2129
+ _values;
2130
+ _features;
2097
2131
  constructor(pbf, end) {
2098
2132
  this.version = 1;
2099
2133
  this.name = "";
@@ -2157,6 +2191,7 @@
2157
2191
 
2158
2192
  // src/lib/binary-vector-tile/vector-tile.ts
2159
2193
  var VectorTile2 = class {
2194
+ layers;
2160
2195
  constructor(pbf, end) {
2161
2196
  this.layers = pbf.readFields(readTile2, {}, end);
2162
2197
  }
@@ -2303,7 +2338,7 @@
2303
2338
  }
2304
2339
 
2305
2340
  // src/mvt-loader.ts
2306
- var VERSION = true ? "4.2.0-alpha.4" : "latest";
2341
+ var VERSION = true ? "4.2.0-alpha.5" : "latest";
2307
2342
  var MVTWorkerLoader = {
2308
2343
  name: "Mapbox Vector Tile",
2309
2344
  id: "mvt",
@@ -2395,7 +2430,9 @@
2395
2430
  }
2396
2431
  getParentPort().then((parentPort2) => {
2397
2432
  if (parentPort2) {
2398
- parentPort2.on("message", handleMessage);
2433
+ parentPort2.on("message", (message) => {
2434
+ handleMessage(message);
2435
+ });
2399
2436
  parentPort2.on("exit", () => console.debug("Node worker closing"));
2400
2437
  } else {
2401
2438
  globalThis.onmessage = handleMessage;
@@ -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.2.0-alpha.4" !== 'undefined' ? "4.2.0-alpha.4" : 'latest';
7
+ const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : '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.2.0-alpha.5",
4
+ "version": "4.2.0-alpha.6",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "publishConfig": {
@@ -41,10 +41,10 @@
41
41
  "build-worker": "esbuild src/workers/mvt-worker.ts --bundle --outfile=dist/mvt-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
42
42
  },
43
43
  "dependencies": {
44
- "@loaders.gl/gis": "4.2.0-alpha.5",
45
- "@loaders.gl/images": "4.2.0-alpha.5",
46
- "@loaders.gl/loader-utils": "4.2.0-alpha.5",
47
- "@loaders.gl/schema": "4.2.0-alpha.5",
44
+ "@loaders.gl/gis": "4.2.0-alpha.6",
45
+ "@loaders.gl/images": "4.2.0-alpha.6",
46
+ "@loaders.gl/loader-utils": "4.2.0-alpha.6",
47
+ "@loaders.gl/schema": "4.2.0-alpha.6",
48
48
  "@math.gl/polygon": "^4.0.0",
49
49
  "pbf": "^3.2.1"
50
50
  },
@@ -54,5 +54,5 @@
54
54
  "peerDependencies": {
55
55
  "@loaders.gl/core": "^4.0.0"
56
56
  },
57
- "gitHead": "32d95a81971f104e4dfeb88ab57065f05321a76a"
57
+ "gitHead": "37bd8ca71763529f18727ee4bf29dd176aa914ca"
58
58
  }