From 2d5a06ac405ffc6d37d87abc8d3347208ab9e95a Mon Sep 17 00:00:00 2001 From: Xiaoji Chen Date: Mon, 25 Jan 2021 18:07:21 -0800 Subject: [PATCH] v5.3/v6.1 What's new and upgrade guide (#1304) --- docs/upgrade-guide.md | 18 ++++++++++++++++++ docs/whats-new.md | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/docs/upgrade-guide.md b/docs/upgrade-guide.md index 5a0d7037..ca65a6b2 100644 --- a/docs/upgrade-guide.md +++ b/docs/upgrade-guide.md @@ -1,9 +1,27 @@ # Upgrade Guide +## Upgrading to v5.3/v6.1 + +- `MapContext` is now an official API. The experimental `_MapContext` export will be removed in a future release. +- `react-virtualized-auto-sizer` is no longer a dependency. +- Inertia and smooth zooming has been enabled by default on the map controller. To revert to the behavior in previous versions, set the [interaction options](/docs/api-reference/interactive-map.md#interaction-options): + +```js +const CONTROLLER_OPTS = { + dragPan: {inertia: 0}, + dragRotate: {inertia: 0}, + touchZoom: {inertia: 0}, + scrollZoom: {smooth: false} +}; + + +``` + ## Upgrading to v6 - A valid Mapbox access token is always required. - The default value of `InteractiveMap`'s `maxPitch` prop is changed to `85` from `60`. +- `mapbox-gl` v2 introduced a breaking change to the build system. Transpiling it may result in a crash in the production build with the message `m is not defined`. Find solutions in [this thread](https://github.com/mapbox/mapbox-gl-js/issues/10173). ## Upgrading to v4 diff --git a/docs/whats-new.md b/docs/whats-new.md index 36703cf6..f5639bdd 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -1,5 +1,21 @@ # What's new +## react-map-gl v5.3/v6.1 + +Release date: Jan 27, 2020 + +### Highlights + +- **TypeScript and Flow typings** are now published with the library +- **More controller customizations.** Smooth easing on wheel scroll, three-finger gesture to change pitch, inertia after pan/pinch, and customizable keyboard navigation speed. See the updated [interaction options](/docs/api-reference/interactive-map.md#interaction-options) for details. +- A new [eventRecognizerOptions](/docs/api-reference/interactive-map.md#eventrecognizeroptions) prop is added for fine-tuning the interaction experience. +- New component: [AttributionControl](/docs/api-reference/attribution-control.md) +- Promoted to official API: [MapContext](/docs/api-reference/map-context.md) +- Resolved React error over attempted state update during render +- `GeolocateControl` added supports for `showAccuracyCircle` +- All controls now support inline styling with a `style` prop +- All components and examples have been rewritten as functional components + ## react-map-gl v6.0 Release date: Dec 16, 2020