Skip to content

Commit 6eeb428

Browse files
Bump version to 4.0.0 (#3647)
* Bump version to 4.0.0 * Update CHANGELOG.md * Update map.ts Late code review... * Update CHANGELOG.md Fixes mistakenly added "-" * Update CHANGELOG.md Align changelog comment --------- Co-authored-by: HarelM <HarelM@users.noreply.github.com> Co-authored-by: Harel M <harel.mazor@gmail.com>
1 parent abb226b commit 6eeb428

4 files changed

Lines changed: 52 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,53 @@
66
### 🐞 Bug fixes
77
- _...Add new stuff here..._
88

9+
## 4.0.0
10+
11+
### ✨ Features and improvements
12+
13+
- ⚠️ Remove all global getters and setters from `maplibregl`, this means the the following methods have changed:
14+
- `maplibregl.version` => `getVersion()`
15+
- `maplibregl.workerCount` => `getWorkerCount()`, `setWorkerCount(...)`
16+
- `maplibregl.maxParallelImageRequests` => `getMaxParallelImageRequests()`, `setMaxParallelImageRequests(...)`
17+
- `maplibregl.workerUrl` => `getWorkerUrl()`, `setWorkerUrl(...)`
18+
19+
This is to avoid the need to use a global object and allow named exports/imports ([#3601](https://github.com/maplibre/maplibre-gl-js/issues/3601))
20+
- ⚠️ Change attribution to be on by default, change `MapOptions.attributionControl` to be the type that the control handles, removed `MapOptions.customAttribution` ([#3618](https://github.com/maplibre/maplibre-gl-js/issues/3618))
21+
Note: showing the logo of MapLibre is not required for using MapLibre.
22+
- ⚠️ Changed cooperative gesture config and removed the strings from it in favor of the locale variable ([#3621](https://github.com/maplibre/maplibre-gl-js/issues/3621))
23+
- ⚠️ 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://github.com/maplibre/maplibre-gl-js/issues/3621))
24+
- ⚠️ 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`.
25+
- ⚠️ Changes `addProtocol` to be promise-based without the usage of callbacks and cancelable ([#3433](https://github.com/maplibre/maplibre-gl-js/pull/3433))
26+
- ⚠️ Moved the `addSourceType` to be a part of the global maplibregl object instead of being per map object ([#3420](https://github.com/maplibre/maplibre-gl-js/pull/3420))
27+
- ⚠️ Removed callback usage from `map.loadImage` in continue to below change ([#3422](https://github.com/maplibre/maplibre-gl-js/pull/3422))
28+
- ⚠️ Changed the `GeoJSONSource`'s `getClusterExpansionZoom`, `getClusterChildren`, `getClusterLeaves` methods to return a `Promise` instead of a callback usage ([#3421](https://github.com/maplibre/maplibre-gl-js/pull/3421))
29+
- ⚠️ Changed the `setRTLTextPlugin` function to return a promise instead of using callback ([#3418](https://github.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.
30+
- ⚠️ Remove `setCooperativeGestures` and `getCooperativeGestures` functions in favor of `cooperativeGestures` handler which now has an `enabled()` or `disabled()` methods ([#3430](https://github.com/maplibre/maplibre-gl-js/pull/3430))
31+
- ⚠️ 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://github.com/maplibre/maplibre-gl-js/pull/3233))
32+
- ⚠️ Changed the `Source` interface to return promises instead of callbacks ([#3233](https://github.com/maplibre/maplibre-gl-js/pull/3233))
33+
- ⚠️ Changed all the sources to be promises based. ([#3233](https://github.com/maplibre/maplibre-gl-js/pull/3233))
34+
- ⚠️ Changed the `map.loadImage` method to return a `Promise` instead of a callback usage ([#3233](https://github.com/maplibre/maplibre-gl-js/pull/3233))
35+
- Add "opacity" option and `setOpacity` method to Marker ([#3620](https://github.com/maplibre/maplibre-gl-js/pull/3620))
36+
- Created a new example showing how to place a threejs scene as a `CustomLayer` over maplibre 3d-terrain ([#3429](https://github.com/maplibre/maplibre-gl-js/pull/3429))
37+
- Changed `ImageRequest` to be `Promise` based ([#3233](https://github.com/maplibre/maplibre-gl-js/pull/3233))
38+
- Improved precision and added a subtle fade transition to marker opacity changes ([#3431](https://github.com/maplibre/maplibre-gl-js/pull/3431))
39+
- 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))
40+
- Upgraded to use Node JS 20 and removed the dependency of `gl` package from the tests to allow easier develpment setup. ([#3452](https://github.com/maplibre/maplibre-gl-js/pull/3452))
41+
42+
### 🐞 Bug fixes
43+
44+
- Fix wheel zoom to be into the same direction above or under the horizon ([#3398](https://github.com/maplibre/maplibre-gl-js/issues/3398))
45+
- Fix _cameraForBoxAndBearing not fitting bounds properly when using asymettrical camera viewport and bearing.([#3591](https://github.com/maplibre/maplibre-gl-js/pull/3591))
46+
- Fix missing export `Map` type in the `d.ts` file ([#3564](https://github.com/maplibre/maplibre-gl-js/pull/3564))
47+
- Fix the shifted mouse events after a css transform scale on the map container ([#3437](https://github.com/maplibre/maplibre-gl-js/pull/3437))
48+
- Fix markers remaining transparent when disabling terrain ([#3431](https://github.com/maplibre/maplibre-gl-js/pull/3431))
49+
- Fix labels disappearing when enabling terrain at high zoom ([#3545](https://github.com/maplibre/maplibre-gl-js/pull/3545))
50+
- Fix zooming outside the central globe when terrain 3D is enabled ([#3425](https://github.com/maplibre/maplibre-gl-js/pull/3425))
51+
- Fix cursor being shown indefinitely as a pointer when removing a popup with its `trackPointer` method active ([#3434](https://github.com/maplibre/maplibre-gl-js/pull/3434))
52+
- Fix a bug in showing cooperative gestures when scroll zoom is disabled ([#2498](https://github.com/maplibre/maplibre-gl-js/pull/2498))
53+
- Handle loading of empty raster tiles (204 No Content) ([#3428](https://github.com/maplibre/maplibre-gl-js/pull/3428))
54+
- Fixes a security issue in `Actor` against XSS attacks in postMessage / onmessage ([#3239](https://github.com/maplibre/maplibre-gl-js/pull/3239))
55+
956
## 4.0.0-pre.6
1057

1158
### ✨ Features and improvements
@@ -30,7 +77,7 @@ Note: showing the logo of MapLibre is not required for using MapLibre.
3077
### 🐞 Bug fixes
3178

3279
- Fix wheel zoom to be into the same direction above or under the horizon ([#3398](https://github.com/maplibre/maplibre-gl-js/issues/3398))
33-
- Fix _cameraForBoxAndBearing not fitting bounds properly when using asymettrical camera viewport and bearing.
80+
- Fix _cameraForBoxAndBearing not fitting bounds properly when using asymettrical camera viewport and bearing ([#3591](https://github.com/maplibre/maplibre-gl-js/pull/3591))
3481

3582
## 4.0.0-pre.4
3683

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "maplibre-gl",
33
"description": "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library",
4-
"version": "4.0.0-pre.6",
4+
"version": "4.0.0",
55
"main": "dist/maplibre-gl.js",
66
"style": "dist/maplibre-gl.css",
77
"license": "BSD-3-Clause",

src/ui/map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ export class Map extends Camera {
466466
_localIdeographFontFamily: string;
467467
_validateStyle: boolean;
468468
_requestManager: RequestManager;
469-
_locale: Partial<typeof defaultLocale>;
469+
_locale: typeof defaultLocale;
470470
_removed: boolean;
471471
_clickTolerance: number;
472472
_overridePixelRatio: number | null;

0 commit comments

Comments
 (0)