mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-25 16:02:50 +00:00
v5.3/v6.1 What's new and upgrade guide (#1304)
This commit is contained in:
parent
f2d5b52ac6
commit
2d5a06ac40
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user