Skip to content

Commit

Permalink
feat(MVT): change mapBox package to mapLib
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed Nov 20, 2024
1 parent 4e7bcd2 commit af5f22a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 80 deletions.
115 changes: 40 additions & 75 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
},
"homepage": "https://itowns.github.io/",
"dependencies": {
"@mapbox/mapbox-gl-style-spec": "^13.28.0",
"@mapbox/vector-tile": "^2.0.3",
"@maplibre/maplibre-gl-style-spec": "^22.0.0",
"@tmcw/togeojson": "^5.8.1",
"@tweenjs/tween.js": "^25.0.0",
"3d-tiles-renderer": "^0.3.39",
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Style.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FEATURE_TYPES } from 'Core/Feature';
import Cache from 'Core/Scheduler/Cache';
import Fetcher from 'Provider/Fetcher';
import * as mapbox from '@mapbox/mapbox-gl-style-spec';
import * as maplibre from '@maplibre/maplibre-gl-style-spec';
import { Color } from 'three';
import { deltaE } from 'Renderer/Color';
import Coordinates from 'Core/Geographic/Coordinates';
Expand Down Expand Up @@ -70,8 +70,8 @@ function rgba2rgb(orig) {

function readVectorProperty(property, options) {
if (property != undefined) {
if (mapbox.expression.isExpression(property)) {
return mapbox.expression.createExpression(property, options).value;
if (maplibre.expression.isExpression(property)) {
return maplibre.expression.createExpression(property, options).value;
} else {
return property;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Source/VectorTilesSource.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { featureFilter } from '@mapbox/mapbox-gl-style-spec';
import { featureFilter } from '@maplibre/maplibre-gl-style-spec';
import Style from 'Core/Style';
import TMSSource from 'Source/TMSSource';
import URLBuilder from 'Provider/URLBuilder';
Expand Down

0 comments on commit af5f22a

Please sign in to comment.