Skip to content

Commit

Permalink
Set terrain from diff (#3515)
Browse files Browse the repository at this point in the history
* Add ability to set terrain from diff resutls

* Updated to reflect latest changes in spec library

* Update changelog

* Fix lint, improve tests.

* More more tests to be async

* Small corrections

* Update style spec package to latest

* Fix lint

* Fix build test
  • Loading branch information
HarelM authored Jan 9, 2024
1 parent 2db2f4e commit ebd9875
Show file tree
Hide file tree
Showing 13 changed files with 639 additions and 618 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"prefer-arrow-callback": "error",
"prefer-const": ["error", {"destructuring": "all"}],
"prefer-template": "error",
"prefer-spread": "off",
// @typescript-eslint/quotes requires standard quotes rule to be turned off
"quotes": "off",
"@typescript-eslint/quotes": ["error", "single"],
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- ⚠️ Add the ability to import a script in the worker thread and call `addProtocol` and `removeProtocol` there ([#3459](https://github.com/maplibre/maplibre-gl-js/pull/3459)) - this also changed how `addSourceType` works since now you'll need to load the script with `maplibregl.importScriptInWorkers`.
- Upgraded to use Node JS 20 and removed the dependency of `gl` package from the tests to allow easier develpment setup.
- Improved precision and added a subtle fade transition to marker opacity changes ([#3431](https://github.com/maplibre/maplibre-gl-js/pull/3431))
- Adds support for terrain in `setStyle` with diff method ([#3515](https://github.com/maplibre/maplibre-gl-js/pull/3515), [#3463](https://github.com/maplibre/maplibre-gl-js/pull/3463))
- _...Add new stuff here..._

### 🐞 Bug fixes
Expand Down
18 changes: 6 additions & 12 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 @@ -20,7 +20,7 @@
"@mapbox/unitbezier": "^0.0.1",
"@mapbox/vector-tile": "^1.3.1",
"@mapbox/whoots-js": "^3.1.0",
"@maplibre/maplibre-gl-style-spec": "^19.3.3",
"@maplibre/maplibre-gl-style-spec": "^20.0.0",
"@types/geojson": "^7946.0.13",
"@types/geojson-vt": "3.2.5",
"@types/mapbox__point-geometry": "^0.1.4",
Expand Down
4 changes: 2 additions & 2 deletions src/source/load_tilejson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export async function loadTileJson(
if (!tileJSON) {
return null;
}
const result: LoadTileJsonResponse = pick(
const result = pick(
// explicit source options take precedence over TileJSON
extend(tileJSON, options),
['tiles', 'minzoom', 'maxzoom', 'attribution', 'bounds', 'scheme', 'tileSize', 'encoding']
);
) as LoadTileJsonResponse;

if ('vector_layers' in tileJSON && tileJSON.vector_layers) {
result.vectorLayerIds = tileJSON.vector_layers.map((layer) => { return layer.id; });
Expand Down
1 change: 1 addition & 0 deletions src/source/vector_tile_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {WorkerTileResult} from './worker_source';

export type VectorTileSourceOptions = VectorSourceSpecification & {
collectResourceTiming?: boolean;
tileSize?: number;
}

/**
Expand Down
Loading

0 comments on commit ebd9875

Please sign in to comment.