Skip to content

Commit

Permalink
made the v5 geometry type change more explicitely documented. (#5317)
Browse files Browse the repository at this point in the history
* made the v5 geometry type change more explicitely documented.

* move the `geometry-type` changelog entry to the top

* Update CHANGELOG.md

---------

Co-authored-by: Harel M <[email protected]>
  • Loading branch information
CommanderStorm and HarelM authored Jan 8, 2025
1 parent d2353b8 commit dd054e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@

### ✨ Features and improvements

- ⚠️ Changed `geometry-type` to identify "Multi-" features ([#4877](https://github.com/maplibre/maplibre-gl-js/pull/4877)). Use `$type` which has no "Multi-" support or use `in` expression to get the previous behavior.
Example:
⚠️ This change means that a filter like `["==", ["geometry-type"], "Polygon"]` would not display `MultiPolygon` features any more.
To fix this, you can
```diff
- "filter": ["==", ["geometry-type"], "Polygon"]
+ "filter": ["==", "$type", "Polygon"]
```
- ⚠️ `StyleLayer`'s `queryIntersectsFeature` method parameters were moved to `QueryIntersectsFeatureParams`. ([#5276](https://github.com/maplibre/maplibre-gl-js/pull/5276)) Wrap the method parameters with `{}` to solve this
- ⚠️ Support setting WebGL context options on map creation ([#5196](https://github.com/maplibre/maplibre-gl-js/pull/5196)). Previously supported WebGL context options like `antialias`, `preserveDrawingBuffer` and `failIfMajorPerformanceCaveat` must now be defined inside the `canvasContextAttributes` object on `MapOptions`.
- ⚠️ Change the return type of `on` method to return a `Subscription` to allow for easy unsubscribe ([#5080](https://github.com/maplibre/maplibre-gl-js/pull/5080)). `map.on('x').on('y')` => `map.on('x'); map.on('y');`.
- ⚠️ Change drag rotate behavior to be around the center of the screen ([#5074](https://github.com/maplibre/maplibre-gl-js/pull/5074))
- ⚠️ Return actual altitude from queryTerrainElevation + Pass non-translated matrices to custom layer on mercator map ([#3854](https://github.com/maplibre/maplibre-gl-js/pull/3854))
- ⚠️ Changed `geometry-type` to identify "Multi-" features ([#4877](https://github.com/maplibre/maplibre-gl-js/pull/4877)). Use `$type` for non "Multi-" support or use `in` expression to get the previous behavior.
Example:
```diff
- "filter": ["==", ["geometry-type"], "Polygon"]
+ "filter": ["==", "$type", "Polygon"]
```
- ⚠️ Remove unminified prod build ([#4906](https://github.com/maplibre/maplibre-gl-js/pull/4906)). You'll need to use a different build.
- Allows setting the desired WebGL version to use ([#5236](https://github.com/maplibre/maplibre-gl-js/pull/5236)). You can now use `contextType` inside `canvasContextAttributes` to choose which WebGL version to use
- Dual-Stack WebGL Runtime with WebGL2 to WebGL1 Fallback ([#5198](https://github.com/maplibre/maplibre-gl-js/pull/5198))
Expand Down

0 comments on commit dd054e3

Please sign in to comment.