v5.3/v6.1 What's new and upgrade guide (#1304)

This commit is contained in:
Xiaoji Chen 2021-01-25 18:07:21 -08:00 committed by GitHub
parent f2d5b52ac6
commit 2d5a06ac40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View File

@ -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}
};
<MapGL {...CONTROLLER_OPTS} ... />
```
## 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

View File

@ -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