From cf20cbec21c7db37aab1888d35252df87511906c Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Mon, 16 Dec 2024 08:08:52 +0100 Subject: [PATCH] docs: add migration docs --- README.md | 8 ++-- docs/guides/migrations/v10.md | 75 +++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 docs/guides/migrations/v10.md diff --git a/README.md b/README.md index 72b3b16fd..cf1ec529c 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ diverged, it has become necessary to separate the projects into specific wrapper - [Android](/docs/guides/setup/Android.md) - [iOS](/docs/guides/setup/iOS.md) - [Expo](/docs/guides/setup/Expo.md) +- Migrations + - [Migrating to v10](/docs/guides/migrations/v10.md) ### Components @@ -41,9 +43,9 @@ diverged, it has become necessary to separate the projects into specific wrapper - [PointAnnotation](/docs/components/PointAnnotation.md) - [MarkerView](/docs/components/MarkerView.md) - [Callout](/docs/components/Callout.md) -- [Camera](docs/components/Camera.md) -- [UserLocation](docs/components/UserLocation.md) -- [Images](docs/components/Images.md) +- [Camera](/docs/components/Camera.md) +- [UserLocation](/docs/components/UserLocation.md) +- [Images](/docs/components/Images.md) ### Sources diff --git a/docs/guides/migrations/v10.md b/docs/guides/migrations/v10.md new file mode 100644 index 000000000..459af1340 --- /dev/null +++ b/docs/guides/migrations/v10.md @@ -0,0 +1,75 @@ +# Migrating to v10 + +## Changes to `Camera` Component + +### Default `animationMode` is now `CameraMode.None` + +The default `animationMode` for a controlled `Camera` is now `CameraMode.None`. To reinstate previous behavior, change the following: + +```diff + +``` + +### Removed `allowUpdates` and `triggerKey` Props + +If you need this functionality, keep your props stable or use the imperative `setCamera`. + +```diff + +``` + +## `MapView` props `styleURL` and `styleJSON` unified to `mapStyle` + +The props `styleURL` and `styleJSON`, which control the style of the `MapView`, have been unified into a single `mapStyle` prop. + +### `styleURL` + +```diff + +``` + +### `styleJSON` + +A style object is now expected as an object, without `JSON.stringify`. + +```diff + +``` + +## Removed `Style` component + +The `Style` component was redundant, as it's possible to pass a style object to the `MapView` directly. + +```diff +- +-