Skip to content

Commit a54429c

Browse files
committed
Update geojson_wrapper.ts
1 parent 54d16da commit a54429c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/geojson_wrapper.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Point from "@mapbox/point-geometry";
2-
import { classifyRings } from "@mapbox/vector-tile";
3-
import type { TileFeature, AnyProps } from "supercluster";
4-
import { type Feature as GeoJSONVTFeature, Geometry } from "geojson-vt";
5-
import type { VectorTileFeatureLike, VectorTileLayerLike } from "../index";
1+
import Point from '@mapbox/point-geometry';
2+
import { classifyRings } from '@mapbox/vector-tile';
3+
import type { TileFeature, AnyProps } from 'supercluster';
4+
import { type Feature as GeoJSONVTFeature, Geometry } from 'geojson-vt';
5+
import type { VectorTileFeatureLike, VectorTileLayerLike } from '../index';
66

77
export type Feature = TileFeature<AnyProps, AnyProps> | GeoJSONVTFeature;
88

@@ -54,6 +54,7 @@ class FeatureWrapper implements VectorTileFeatureLike {
5454
return geometry;
5555
}
5656

57+
// Adapted from VectorTileFeature.toGeoJSON in @mapbox/vector-tile
5758
toGeoJSON(x: number, y: number, z: number): GeoJSON.Feature {
5859
const size = this.extent * Math.pow(2, z),
5960
x0 = this.extent * x,

0 commit comments

Comments
 (0)