@loaders.gl/mvt 4.0.0-beta.4 → 4.0.0-beta.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/dist.dev.js CHANGED
@@ -1564,6 +1564,7 @@ var __exports__ = (() => {
1564
1564
  }
1565
1565
  function makeAccessorObjects(points, lines, polygons, coordLength) {
1566
1566
  const binaryFeatures = {
1567
+ shape: "binary-feature-collection",
1567
1568
  points: {
1568
1569
  ...points,
1569
1570
  positions: {
@@ -24,6 +24,7 @@ type MVTWgs84CoordinatesOptions = {
24
24
  };
25
25
  };
26
26
  export type MVTOptions = (MVTLocalCoordinatesOptions | MVTWgs84CoordinatesOptions) & {
27
+ shape?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';
27
28
  /**
28
29
  * When non-`null`, the layer name of each feature is added to
29
30
  * `feature.properties[layerProperty]`. (A `feature.properties` object is created if the feature
@@ -35,7 +36,6 @@ export type MVTOptions = (MVTLocalCoordinatesOptions | MVTWgs84CoordinatesOption
35
36
  * be included in the output. If `null`, features from all layers are returned.
36
37
  */
37
38
  layers?: string[];
38
- shape?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';
39
39
  };
40
40
  export type MVTMapboxGeometry = {
41
41
  type?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE5D,2DAA2D;AAC3D,KAAK,0BAA0B,GAAG;IAChC;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF,sDAAsD;AACtD,KAAK,0BAA0B,GAAG;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE;QAAC,CAAC,EAAE,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C;AAEF,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,yCAAyC;QACzC,MAAM,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,iBAAiB,CAAC;KACxF,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/lib/types.ts"],"sourcesContent":["import type {LoaderOptions} from '@loaders.gl/loader-utils';\n\n/** For local coordinates, the tileIndex is not required */\ntype MVTLocalCoordinatesOptions = {\n /**\n * When set to `local`, the parser will return a flat array of GeoJSON objects with local coordinates decoded from tile origin.\n */\n coordinates: 'local';\n tileIndex: null;\n};\n\n/** In WGS84 coordinates, the tileIndex is required */\ntype MVTWgs84CoordinatesOptions = {\n /**\n * When set to `wgs84`, the parser will return a flat array of GeoJSON objects with coordinates in longitude, latitude decoded from the provided tile index.\n */\n coordinates?: 'wgs84';\n\n /**\n * Mandatory with `wgs84` coordinates option. An object containing tile index values (`x`, `y`,\n * `z`) to reproject features' coordinates into WGS84.\n */\n tileIndex?: {x: number; y: number; z: number};\n};\n\nexport type MVTOptions = (MVTLocalCoordinatesOptions | MVTWgs84CoordinatesOptions) & {\n /**\n * When non-`null`, the layer name of each feature is added to\n * `feature.properties[layerProperty]`. (A `feature.properties` object is created if the feature\n * has no existing properties). If set to `null`, a layer name property will not be added.\n */\n layerProperty?: string | number;\n\n /**\n * Optional list of layer names. If not `null`, only features belonging to the named layers will\n * be included in the output. If `null`, features from all layers are returned.\n */\n layers?: string[];\n shape?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';\n};\n\nexport type MVTMapboxGeometry = {\n type?: string;\n id?: number;\n length: number;\n coordinates?: any[];\n};\n\nexport type MVTMapboxCoordinates = {\n type: string;\n geometry: {\n type: string;\n coordinates: MVTMapboxGeometry;\n };\n properties: {[x: string]: string | number | boolean | null};\n id?: number;\n};\n\nexport type MVTLoaderOptions = LoaderOptions & {\n mvt?: MVTOptions;\n gis?: {\n /**\n * When set to `true`, the parser will output the data in binary format. This is equivalent to loading the data as GeoJSON and then applying [geojsonToBinary](https://loaders.gl/modules/gis/docs/api-reference/geojson-to-binary).\n */\n binary?: boolean;\n /** @deprecated. Use options.mvt.shape */\n format?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';\n };\n};\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/lib/types.ts"],"sourcesContent":["import type {LoaderOptions} from '@loaders.gl/loader-utils';\n\n/** For local coordinates, the tileIndex is not required */\ntype MVTLocalCoordinatesOptions = {\n /**\n * When set to `local`, the parser will return a flat array of GeoJSON objects with local coordinates decoded from tile origin.\n */\n coordinates: 'local';\n tileIndex: null;\n};\n\n/** In WGS84 coordinates, the tileIndex is required */\ntype MVTWgs84CoordinatesOptions = {\n /**\n * When set to `wgs84`, the parser will return a flat array of GeoJSON objects with coordinates in longitude, latitude decoded from the provided tile index.\n */\n coordinates?: 'wgs84';\n\n /**\n * Mandatory with `wgs84` coordinates option. An object containing tile index values (`x`, `y`,\n * `z`) to reproject features' coordinates into WGS84.\n */\n tileIndex?: {x: number; y: number; z: number};\n};\n\nexport type MVTOptions = (MVTLocalCoordinatesOptions | MVTWgs84CoordinatesOptions) & {\n shape?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';\n /**\n * When non-`null`, the layer name of each feature is added to\n * `feature.properties[layerProperty]`. (A `feature.properties` object is created if the feature\n * has no existing properties). If set to `null`, a layer name property will not be added.\n */\n layerProperty?: string | number;\n\n /**\n * Optional list of layer names. If not `null`, only features belonging to the named layers will\n * be included in the output. If `null`, features from all layers are returned.\n */\n layers?: string[];\n};\n\nexport type MVTMapboxGeometry = {\n type?: string;\n id?: number;\n length: number;\n coordinates?: any[];\n};\n\nexport type MVTMapboxCoordinates = {\n type: string;\n geometry: {\n type: string;\n coordinates: MVTMapboxGeometry;\n };\n properties: {[x: string]: string | number | boolean | null};\n id?: number;\n};\n\nexport type MVTLoaderOptions = LoaderOptions & {\n mvt?: MVTOptions;\n gis?: {\n /**\n * When set to `true`, the parser will output the data in binary format. This is equivalent to loading the data as GeoJSON and then applying [geojsonToBinary](https://loaders.gl/modules/gis/docs/api-reference/geojson-to-binary).\n */\n binary?: boolean;\n /** @deprecated. Use options.mvt.shape */\n format?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';\n };\n};\n"],"mappings":""}
@@ -1557,6 +1557,7 @@
1557
1557
  }
1558
1558
  function makeAccessorObjects(points, lines, polygons, coordLength) {
1559
1559
  const binaryFeatures = {
1560
+ shape: "binary-feature-collection",
1560
1561
  points: {
1561
1562
  ...points,
1562
1563
  positions: { value: points.positions, size: coordLength },
@@ -2302,7 +2303,7 @@
2302
2303
  }
2303
2304
 
2304
2305
  // src/mvt-loader.ts
2305
- var VERSION = true ? "4.0.0-beta.4" : "latest";
2306
+ var VERSION = true ? "4.0.0-beta.6" : "latest";
2306
2307
  var MVTWorkerLoader = {
2307
2308
  name: "Mapbox Vector Tile",
2308
2309
  id: "mvt",
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.0.0-beta.4",
4
+ "version": "4.0.0-beta.6",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "publishConfig": {
@@ -40,15 +40,15 @@
40
40
  "build-worker": "esbuild src/workers/mvt-worker.ts --bundle --outfile=dist/mvt-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
41
41
  },
42
42
  "dependencies": {
43
- "@loaders.gl/gis": "4.0.0-beta.4",
44
- "@loaders.gl/images": "4.0.0-beta.4",
45
- "@loaders.gl/loader-utils": "4.0.0-beta.4",
46
- "@loaders.gl/schema": "4.0.0-beta.4",
43
+ "@loaders.gl/gis": "4.0.0-beta.6",
44
+ "@loaders.gl/images": "4.0.0-beta.6",
45
+ "@loaders.gl/loader-utils": "4.0.0-beta.6",
46
+ "@loaders.gl/schema": "4.0.0-beta.6",
47
47
  "@math.gl/polygon": "^4.0.0",
48
48
  "pbf": "^3.2.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/pbf": "^3.0.2"
52
52
  },
53
- "gitHead": "848c20b474532d301f2c3f8d4e1fb9bf262b86d4"
53
+ "gitHead": "2840f605b7a551e2ffef5f960231d989a0414c50"
54
54
  }
package/src/lib/types.ts CHANGED
@@ -24,6 +24,7 @@ type MVTWgs84CoordinatesOptions = {
24
24
  };
25
25
 
26
26
  export type MVTOptions = (MVTLocalCoordinatesOptions | MVTWgs84CoordinatesOptions) & {
27
+ shape?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';
27
28
  /**
28
29
  * When non-`null`, the layer name of each feature is added to
29
30
  * `feature.properties[layerProperty]`. (A `feature.properties` object is created if the feature
@@ -36,7 +37,6 @@ export type MVTOptions = (MVTLocalCoordinatesOptions | MVTWgs84CoordinatesOption
36
37
  * be included in the output. If `null`, features from all layers are returned.
37
38
  */
38
39
  layers?: string[];
39
- shape?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';
40
40
  };
41
41
 
42
42
  export type MVTMapboxGeometry = {