@loaders.gl/mvt 4.3.0-alpha.7 → 4.3.0-beta.1

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.
@@ -2,8 +2,13 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright vis.gl contributors
4
4
 
5
- import type {FlatFeature, Feature, GeojsonGeometryInfo} from '@loaders.gl/schema';
6
- import type {GeoJSONTable, BinaryFeatureCollection} from '@loaders.gl/schema';
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
- import {Feature} from '@loaders.gl/schema';
7
- import {FlatFeature, FlatIndexedGeometry, GeojsonGeometryInfo} from '@loaders.gl/schema';
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 {classifyRings, classifyRingsFlat} from '../utils/geometry-utils';
10
- import {projectToLngLat, projectToLngLatFlat} from '../utils/geometry-utils';
11
- import {convertToLocalCoordinates, convertToLocalCoordinatesFlat} from '../utils/geometry-utils';
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};
@@ -112,18 +112,18 @@ function readValueMessage(pbf: Protobuf) {
112
112
  tag === 1
113
113
  ? pbf.readString()
114
114
  : tag === 2
115
- ? pbf.readFloat()
116
- : tag === 3
117
- ? pbf.readDouble()
118
- : tag === 4
119
- ? pbf.readVarint64()
120
- : tag === 5
121
- ? pbf.readVarint()
122
- : tag === 6
123
- ? pbf.readSVarint()
124
- : tag === 7
125
- ? pbf.readBoolean()
126
- : null;
115
+ ? pbf.readFloat()
116
+ : tag === 3
117
+ ? pbf.readDouble()
118
+ : tag === 4
119
+ ? pbf.readVarint64()
120
+ : tag === 5
121
+ ? pbf.readVarint()
122
+ : tag === 6
123
+ ? pbf.readSVarint()
124
+ : tag === 7
125
+ ? pbf.readBoolean()
126
+ : null;
127
127
  }
128
128
 
129
129
  return value;
@@ -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 {Source} from '@loaders.gl/loader-utils';
6
- import type {ImageType, DataSourceProps} from '@loaders.gl/loader-utils';
7
- import type {ImageTileSource, VectorTileSource} from '@loaders.gl/loader-utils';
8
- import type {GetTileParameters, GetTileDataParameters} from '@loaders.gl/loader-utils';
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 {
@@ -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 {VectorTileSource, TileSourceMetadata, log} from '@loaders.gl/loader-utils';
14
- import {Schema, GeoJSONTable, Feature, BinaryFeatureCollection} from '@loaders.gl/schema';
15
- import {deduceTableSchema} from '@loaders.gl/schema';
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';