maplibre/maplibre-gl-js (maplibre-gl)
### [`v4.0.0`](https://togithub.com/maplibre/maplibre-gl-js/blob/HEAD/CHANGELOG.md#400)
[Compare Source](https://togithub.com/maplibre/maplibre-gl-js/compare/v3.6.2...v4.0.0)
##### ✨ Features and improvements
- ⚠️ Remove all global getters and setters from `maplibregl`, this means the the following methods have changed:
- `maplibregl.version` => `getVersion()`
- `maplibregl.workerCount` => `getWorkerCount()`, `setWorkerCount(...)`
- `maplibregl.maxParallelImageRequests` => `getMaxParallelImageRequests()`, `setMaxParallelImageRequests(...)`
- `maplibregl.workerUrl` => `getWorkerUrl()`, `setWorkerUrl(...)`
This is to avoid the need to use a global object and allow named exports/imports ([#3601](https://togithub.com/maplibre/maplibre-gl-js/issues/3601))
- ⚠️ Change attribution to be on by default, change `MapOptions.attributionControl` to be the type that the control handles, removed `MapOptions.customAttribution` ([#3618](https://togithub.com/maplibre/maplibre-gl-js/issues/3618))
Note: showing the logo of MapLibre is not required for using MapLibre.
- ⚠️ Changed cooperative gesture config and removed the strings from it in favor of the locale variable ([#3621](https://togithub.com/maplibre/maplibre-gl-js/issues/3621))
- ⚠️ Changed the terrain enable disable locale key to match the other keys' styles, updated the typings to allow using locale with more ease ([#3621](https://togithub.com/maplibre/maplibre-gl-js/issues/3621))
- ⚠️ Add the ability to import a script in the worker thread and call `addProtocol` and `removeProtocol` there ([#3459](https://togithub.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`.
- ⚠️ Changes `addProtocol` to be promise-based without the usage of callbacks and cancelable ([#3433](https://togithub.com/maplibre/maplibre-gl-js/pull/3433))
- ⚠️ Moved the `addSourceType` to be a part of the global maplibregl object instead of being per map object ([#3420](https://togithub.com/maplibre/maplibre-gl-js/pull/3420))
- ⚠️ Removed callback usage from `map.loadImage` in continue to below change ([#3422](https://togithub.com/maplibre/maplibre-gl-js/pull/3422))
- ⚠️ Changed the `GeoJSONSource`'s `getClusterExpansionZoom`, `getClusterChildren`, `getClusterLeaves` methods to return a `Promise` instead of a callback usage ([#3421](https://togithub.com/maplibre/maplibre-gl-js/pull/3421))
- ⚠️ Changed the `setRTLTextPlugin` function to return a promise instead of using callback ([#3418](https://togithub.com/maplibre/maplibre-gl-js/pull/3418)) this also changed how the RTL pluing code is handled internally by splitting the main thread and worker thread code.
- ⚠️ Remove `setCooperativeGestures` and `getCooperativeGestures` functions in favor of `cooperativeGestures` handler which now has an `enabled()` or `disabled()` methods ([#3430](https://togithub.com/maplibre/maplibre-gl-js/pull/3430))
- ⚠️ Changed the undeling worker communication from callbacks to promises. This has a breaking effect on the implementation of custom `WorkerSource` and how it behaves ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233))
- ⚠️ Changed the `Source` interface to return promises instead of callbacks ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233))
- ⚠️ Changed all the sources to be promises based. ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233))
- ⚠️ Changed the `map.loadImage` method to return a `Promise` instead of a callback usage ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233))
- Add "opacity" option and `setOpacity` method to Marker ([#3620](https://togithub.com/maplibre/maplibre-gl-js/pull/3620))
- Created a new example showing how to place a threejs scene as a `CustomLayer` over maplibre 3d-terrain ([#3429](https://togithub.com/maplibre/maplibre-gl-js/pull/3429))
- Changed `ImageRequest` to be `Promise` based ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233))
- Improved precision and added a subtle fade transition to marker opacity changes ([#3431](https://togithub.com/maplibre/maplibre-gl-js/pull/3431))
- Adds support for terrain in `setStyle` with diff method ([#3515](https://togithub.com/maplibre/maplibre-gl-js/pull/3515), [#3463](https://togithub.com/maplibre/maplibre-gl-js/pull/3463))
- Upgraded to use Node JS 20 and removed the dependency of `gl` package from the tests to allow easier develpment setup. ([#3452](https://togithub.com/maplibre/maplibre-gl-js/pull/3452))
##### 🐞 Bug fixes
- Fix wheel zoom to be into the same direction above or under the horizon ([#3398](https://togithub.com/maplibre/maplibre-gl-js/issues/3398))
- Fix \_cameraForBoxAndBearing not fitting bounds properly when using asymettrical camera viewport and bearing.([#3591](https://togithub.com/maplibre/maplibre-gl-js/pull/3591))
- Fix missing export `Map` type in the `d.ts` file ([#3564](https://togithub.com/maplibre/maplibre-gl-js/pull/3564))
- Fix the shifted mouse events after a css transform scale on the map container ([#3437](https://togithub.com/maplibre/maplibre-gl-js/pull/3437))
- Fix markers remaining transparent when disabling terrain ([#3431](https://togithub.com/maplibre/maplibre-gl-js/pull/3431))
- Fix labels disappearing when enabling terrain at high zoom ([#3545](https://togithub.com/maplibre/maplibre-gl-js/pull/3545))
- Fix zooming outside the central globe when terrain 3D is enabled ([#3425](https://togithub.com/maplibre/maplibre-gl-js/pull/3425))
- Fix cursor being shown indefinitely as a pointer when removing a popup with its `trackPointer` method active ([#3434](https://togithub.com/maplibre/maplibre-gl-js/pull/3434))
- Fix a bug in showing cooperative gestures when scroll zoom is disabled ([#2498](https://togithub.com/maplibre/maplibre-gl-js/pull/2498))
- Handle loading of empty raster tiles (204 No Content) ([#3428](https://togithub.com/maplibre/maplibre-gl-js/pull/3428))
- Fixes a security issue in `Actor` against XSS attacks in postMessage / onmessage ([#3239](https://togithub.com/maplibre/maplibre-gl-js/pull/3239))
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^3.0.1
->^4.0.0
Release Notes
maplibre/maplibre-gl-js (maplibre-gl)
### [`v4.0.0`](https://togithub.com/maplibre/maplibre-gl-js/blob/HEAD/CHANGELOG.md#400) [Compare Source](https://togithub.com/maplibre/maplibre-gl-js/compare/v3.6.2...v4.0.0) ##### ✨ Features and improvements - ⚠️ Remove all global getters and setters from `maplibregl`, this means the the following methods have changed: - `maplibregl.version` => `getVersion()` - `maplibregl.workerCount` => `getWorkerCount()`, `setWorkerCount(...)` - `maplibregl.maxParallelImageRequests` => `getMaxParallelImageRequests()`, `setMaxParallelImageRequests(...)` - `maplibregl.workerUrl` => `getWorkerUrl()`, `setWorkerUrl(...)` This is to avoid the need to use a global object and allow named exports/imports ([#3601](https://togithub.com/maplibre/maplibre-gl-js/issues/3601)) - ⚠️ Change attribution to be on by default, change `MapOptions.attributionControl` to be the type that the control handles, removed `MapOptions.customAttribution` ([#3618](https://togithub.com/maplibre/maplibre-gl-js/issues/3618)) Note: showing the logo of MapLibre is not required for using MapLibre. - ⚠️ Changed cooperative gesture config and removed the strings from it in favor of the locale variable ([#3621](https://togithub.com/maplibre/maplibre-gl-js/issues/3621)) - ⚠️ Changed the terrain enable disable locale key to match the other keys' styles, updated the typings to allow using locale with more ease ([#3621](https://togithub.com/maplibre/maplibre-gl-js/issues/3621)) - ⚠️ Add the ability to import a script in the worker thread and call `addProtocol` and `removeProtocol` there ([#3459](https://togithub.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`. - ⚠️ Changes `addProtocol` to be promise-based without the usage of callbacks and cancelable ([#3433](https://togithub.com/maplibre/maplibre-gl-js/pull/3433)) - ⚠️ Moved the `addSourceType` to be a part of the global maplibregl object instead of being per map object ([#3420](https://togithub.com/maplibre/maplibre-gl-js/pull/3420)) - ⚠️ Removed callback usage from `map.loadImage` in continue to below change ([#3422](https://togithub.com/maplibre/maplibre-gl-js/pull/3422)) - ⚠️ Changed the `GeoJSONSource`'s `getClusterExpansionZoom`, `getClusterChildren`, `getClusterLeaves` methods to return a `Promise` instead of a callback usage ([#3421](https://togithub.com/maplibre/maplibre-gl-js/pull/3421)) - ⚠️ Changed the `setRTLTextPlugin` function to return a promise instead of using callback ([#3418](https://togithub.com/maplibre/maplibre-gl-js/pull/3418)) this also changed how the RTL pluing code is handled internally by splitting the main thread and worker thread code. - ⚠️ Remove `setCooperativeGestures` and `getCooperativeGestures` functions in favor of `cooperativeGestures` handler which now has an `enabled()` or `disabled()` methods ([#3430](https://togithub.com/maplibre/maplibre-gl-js/pull/3430)) - ⚠️ Changed the undeling worker communication from callbacks to promises. This has a breaking effect on the implementation of custom `WorkerSource` and how it behaves ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233)) - ⚠️ Changed the `Source` interface to return promises instead of callbacks ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233)) - ⚠️ Changed all the sources to be promises based. ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233)) - ⚠️ Changed the `map.loadImage` method to return a `Promise` instead of a callback usage ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233)) - Add "opacity" option and `setOpacity` method to Marker ([#3620](https://togithub.com/maplibre/maplibre-gl-js/pull/3620)) - Created a new example showing how to place a threejs scene as a `CustomLayer` over maplibre 3d-terrain ([#3429](https://togithub.com/maplibre/maplibre-gl-js/pull/3429)) - Changed `ImageRequest` to be `Promise` based ([#3233](https://togithub.com/maplibre/maplibre-gl-js/pull/3233)) - Improved precision and added a subtle fade transition to marker opacity changes ([#3431](https://togithub.com/maplibre/maplibre-gl-js/pull/3431)) - Adds support for terrain in `setStyle` with diff method ([#3515](https://togithub.com/maplibre/maplibre-gl-js/pull/3515), [#3463](https://togithub.com/maplibre/maplibre-gl-js/pull/3463)) - Upgraded to use Node JS 20 and removed the dependency of `gl` package from the tests to allow easier develpment setup. ([#3452](https://togithub.com/maplibre/maplibre-gl-js/pull/3452)) ##### 🐞 Bug fixes - Fix wheel zoom to be into the same direction above or under the horizon ([#3398](https://togithub.com/maplibre/maplibre-gl-js/issues/3398)) - Fix \_cameraForBoxAndBearing not fitting bounds properly when using asymettrical camera viewport and bearing.([#3591](https://togithub.com/maplibre/maplibre-gl-js/pull/3591)) - Fix missing export `Map` type in the `d.ts` file ([#3564](https://togithub.com/maplibre/maplibre-gl-js/pull/3564)) - Fix the shifted mouse events after a css transform scale on the map container ([#3437](https://togithub.com/maplibre/maplibre-gl-js/pull/3437)) - Fix markers remaining transparent when disabling terrain ([#3431](https://togithub.com/maplibre/maplibre-gl-js/pull/3431)) - Fix labels disappearing when enabling terrain at high zoom ([#3545](https://togithub.com/maplibre/maplibre-gl-js/pull/3545)) - Fix zooming outside the central globe when terrain 3D is enabled ([#3425](https://togithub.com/maplibre/maplibre-gl-js/pull/3425)) - Fix cursor being shown indefinitely as a pointer when removing a popup with its `trackPointer` method active ([#3434](https://togithub.com/maplibre/maplibre-gl-js/pull/3434)) - Fix a bug in showing cooperative gestures when scroll zoom is disabled ([#2498](https://togithub.com/maplibre/maplibre-gl-js/pull/2498)) - Handle loading of empty raster tiles (204 No Content) ([#3428](https://togithub.com/maplibre/maplibre-gl-js/pull/3428)) - Fixes a security issue in `Actor` against XSS attacks in postMessage / onmessage ([#3239](https://togithub.com/maplibre/maplibre-gl-js/pull/3239))Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.