Skip to content

Bump @mapbox/point-geometry from 0.1.0 to 1.0.0 #4393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
134 changes: 99 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,30 @@
"dependencies": {
"@mapbox/geojson-rewind": "^0.5.2",
"@mapbox/jsonlint-lines-primitives": "^2.0.2",
"@mapbox/point-geometry": "^0.1.0",
"@mapbox/point-geometry": "^1.0.0",
"@mapbox/tiny-sdf": "^2.0.6",
"@mapbox/unitbezier": "^0.0.1",
"@mapbox/vector-tile": "^1.3.1",
"@mapbox/vector-tile": "^2.0.2",
"@mapbox/whoots-js": "^3.1.0",
"@maplibre/maplibre-gl-style-spec": "^20.3.0",
"@types/geojson": "^7946.0.14",
"@types/geojson-vt": "3.2.5",
"@types/junit-report-builder": "^3.0.2",
"@types/mapbox__point-geometry": "^0.1.4",
"@types/mapbox__vector-tile": "^1.3.4",
"@types/pbf": "^3.0.5",
"@types/supercluster": "^7.1.3",
"earcut": "^3.0.0",
"geojson-vt": "^4.0.2",
"gl-matrix": "^3.4.3",
"global-prefix": "^3.0.0",
"kdbush": "^4.0.2",
"murmurhash-js": "^1.0.0",
"pbf": "^3.3.0",
"pbf": "^4.0.1",
"potpack": "^2.0.0",
"quickselect": "^3.0.0",
"supercluster": "^8.0.1",
"tinyqueue": "^3.0.0",
"vt-pbf": "^3.1.3"
},
"devDependencies": {
"autoprefixer": "^10.4.19",
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
"@mapbox/mvt-fixtures": "^3.10.0",
"@rollup/plugin-commonjs": "^26.0.1",
Expand Down Expand Up @@ -81,6 +77,7 @@
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.0",
"address": "^2.0.3",
"autoprefixer": "^10.4.19",
"benchmark": "^2.1.4",
"canvas": "^2.11.2",
"cssnano": "^7.0.4",
Expand Down
5 changes: 2 additions & 3 deletions src/data/bucket/fill_extrusion_bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {ProgramConfigurationSet} from '../program_configuration';
import {TriangleIndexArray} from '../index_array_type';
import {EXTENT} from '../extent';
import earcut from 'earcut';
import mvt from '@mapbox/vector-tile';
const vectorTileFeatureTypes = mvt.VectorTileFeature.types;
import {VectorTileFeature} from '@mapbox/vector-tile';
import {classifyRings} from '@maplibre/maplibre-gl-style-spec';
const EARCUT_MAX_RINGS = 500;
import {register} from '../../util/web_worker_transfer';
Expand Down Expand Up @@ -234,7 +233,7 @@ export class FillExtrusionBucket implements Bucket {

//Only triangulate and draw the area of the feature if it is a polygon
//Other feature types (e.g. LineString) do not have area, so triangulation is pointless / undefined
if (vectorTileFeatureTypes[feature.type] !== 'Polygon')
if (VectorTileFeature.types[feature.type] !== 'Polygon')
continue;

const flattened = [];
Expand Down
5 changes: 2 additions & 3 deletions src/data/bucket/line_bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {SegmentVector} from '../segment';
import {ProgramConfigurationSet} from '../program_configuration';
import {TriangleIndexArray} from '../index_array_type';
import {EXTENT} from '../extent';
import mvt from '@mapbox/vector-tile';
const vectorTileFeatureTypes = mvt.VectorTileFeature.types;
import {VectorTileFeature} from '@mapbox/vector-tile';
import {register} from '../../util/web_worker_transfer';
import {hasPattern, addPatternDependencies} from './pattern_bucket_features';
import {loadGeometry} from '../load_geometry';
Expand Down Expand Up @@ -273,7 +272,7 @@ export class LineBucket implements Bucket {
this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance);
}

const isPolygon = vectorTileFeatureTypes[feature.type] === 'Polygon';
const isPolygon = VectorTileFeature.types[feature.type] === 'Polygon';

// If the line has duplicate vertices at the ends, adjust start/length to remove them.
let len = vertices.length;
Expand Down
5 changes: 2 additions & 3 deletions src/data/bucket/symbol_bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ import {allowsVerticalWritingMode, stringContainsRTLText} from '../../util/scrip
import {WritingMode} from '../../symbol/shaping';
import {loadGeometry} from '../load_geometry';
import {toEvaluationFeature} from '../evaluation_feature';
import mvt from '@mapbox/vector-tile';
const vectorTileFeatureTypes = mvt.VectorTileFeature.types;
import {VectorTileFeature} from '@mapbox/vector-tile';
import {verticalizedCharacterMap} from '../../util/verticalize_punctuation';
import {Anchor} from '../../symbol/anchor';
import {getSizeData, MAX_PACKED_SIZE} from '../../symbol/symbol_size';
Expand Down Expand Up @@ -522,7 +521,7 @@ export class SymbolBucket implements Bucket {
sourceLayerIndex,
geometry: evaluationFeature.geometry,
properties: feature.properties,
type: vectorTileFeatureTypes[feature.type],
type: VectorTileFeature.types[feature.type],
sortKey
};
this.features.push(symbolFeature);
Expand Down
5 changes: 2 additions & 3 deletions src/data/feature_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {EXTENT} from './extent';
import {featureFilter} from '@maplibre/maplibre-gl-style-spec';
import {TransferableGridIndex} from '../util/transferable_grid_index';
import {DictionaryCoder} from '../util/dictionary_coder';
import vt from '@mapbox/vector-tile';
import {VectorTile, type VectorTileFeature, type VectorTileLayer} from '@mapbox/vector-tile';
import Protobuf from 'pbf';
import {GeoJSONFeature} from '../util/vectortile_to_geojson';
import type {MapGeoJSONFeature} from '../util/vectortile_to_geojson';
Expand All @@ -22,7 +22,6 @@ import {mat4} from 'gl-matrix';
import type {StyleLayer} from '../style/style_layer';
import type {FeatureFilter, FeatureState, FilterSpecification, PromoteIdSpecification} from '@maplibre/maplibre-gl-style-spec';
import type {Transform} from '../geo/transform';
import type {VectorTileFeature, VectorTileLayer} from '@mapbox/vector-tile';

type QueryParameters = {
scale: number;
Expand Down Expand Up @@ -98,7 +97,7 @@ export class FeatureIndex {

loadVTLayers(): {[_: string]: VectorTileLayer} {
if (!this.vtLayers) {
this.vtLayers = new vt.VectorTile(new Protobuf(this.rawTileData)).layers;
this.vtLayers = new VectorTile(new Protobuf(this.rawTileData)).layers;
this.sourceLayerCoder = new DictionaryCoder(this.vtLayers ? Object.keys(this.vtLayers).sort() : ['_geojsonTileLayer']);
}
return this.vtLayers;
Expand Down
Loading
Loading