@maplibre/maplibre-react-native 10.0.0-alpha.22 → 10.0.0-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CONTRIBUTING.md +20 -14
  3. package/README.md +12 -13
  4. package/android/install.md +3 -2
  5. package/android/rctmln/build.gradle +5 -0
  6. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java +9 -1
  7. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java +1 -1
  8. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java +1 -1
  9. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java +1 -1
  10. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java +1 -1
  11. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +1 -1
  12. package/babel.config.js +1 -1
  13. package/docs/Camera.md +1 -1
  14. package/docs/GettingStarted.md +3 -4
  15. package/docs/MapView.md +3 -9
  16. package/docs/ShapeSource.md +4 -7
  17. package/docs/docs.json +15 -15
  18. package/ios/RCTMLN.xcodeproj/project.pbxproj +1 -775
  19. package/ios/install.md +1 -1
  20. package/javascript/MLNModule.ts +1 -1
  21. package/javascript/components/Camera.tsx +8 -8
  22. package/javascript/components/HeadingIndicator.tsx +1 -0
  23. package/javascript/components/MapView.tsx +2 -3
  24. package/javascript/components/MarkerView.tsx +2 -2
  25. package/javascript/components/PointAnnotation.tsx +2 -2
  26. package/javascript/components/ShapeSource.tsx +29 -28
  27. package/javascript/components/Style.tsx +1 -1
  28. package/javascript/modules/offline/OfflineCreatePackOptions.ts +2 -9
  29. package/javascript/modules/snapshot/SnapshotOptions.ts +4 -5
  30. package/javascript/utils/StyleValue.ts +3 -1
  31. package/javascript/utils/makeNativeBounds.ts +5 -0
  32. package/maplibre-react-native.podspec +7 -7
  33. package/package.json +12 -15
  34. package/plugin/build/withMapLibre.js +16 -1
  35. package/plugin/install.md +1 -8
  36. package/scripts/utils/template-globals.js +1 -1
  37. package/style-spec/v8.json +32 -1
  38. package/assets/mapbox_logo.png +0 -0
  39. package/javascript/types/png.d.ts +0 -1
  40. package/javascript/utils/geoUtils.ts +0 -79
package/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ PR Title ([#123](link to my pr))
6
6
 
7
7
  ```
8
8
 
9
+ ## 10.0.0-alpha.24
10
+
11
+ feat: support new arch through interop layer ([#483](https://github.com/maplibre/maplibre-react-native/pull/483))
12
+
13
+ ## 10.0.0-alpha.23
14
+
15
+ fix: keep @ts-ignore for headingIcon in library ([#477](https://github.com/maplibre/maplibre-react-native/pull/477))
16
+ feat: upgrade @turf to v7 and remove geo utils ([#478](https://github.com/maplibre/maplibre-react-native/pull/478))
17
+ docs: improve guides and branding ([#475](https://github.com/maplibre/maplibre-react-native/pull/475))
18
+ chore: improve examples monorepo setup with reusable App ([#474](https://github.com/maplibre/maplibre-react-native/pull/474))
19
+ chore: remove react native elements from examples ([#472](https://github.com/maplibre/maplibre-react-native/pull/472))
20
+
9
21
  ## 10.0.0-alpha.22
10
22
 
11
23
  chore: configure jest to use with ts
package/CONTRIBUTING.md CHANGED
@@ -8,26 +8,32 @@ your dev environment and streamline the review process.
8
8
  This project includes `.nvmrc`. You should use nvm so that you're always developing for the correct
9
9
  version of Node.
10
10
 
11
- This project uses `yarn` as a package manager. DO NOT install `yarn` using `npm` as that will install
12
- the outdated 1.x branch. Full instructions are in the [yarn docs](https://yarnpkg.com/getting-started/install),
13
- but here's the quick checklist at the time of this writing.
11
+ This project uses `yarn` as a package manager.
12
+
13
+ > [!CAUTION]
14
+ > DO NOT install `yarn` using `npm` as that will install the outdated 1.x branch. Full instructions are in
15
+ > the [yarn docs](https://yarnpkg.com/getting-started/install), but here's the quick checklist at the time of this
16
+ > writing.
14
17
 
15
18
  Make sure to correctly configure your Editor following [this docs](https://yarnpkg.com/getting-started/editor-sdks).
16
19
 
17
20
  1. `corepack enable`
18
21
  2. `corepack prepare yarn@stable --activate`
19
- 3. On first install, the above may change your yarn config away from `pnp`; check your git working copy for changes and revert if necessary.
22
+ 3. On first install, the above may change your yarn config away from `pnp`; check your git working copy for changes and
23
+ revert if necessary.
20
24
  4. `yarn install`
21
25
 
22
26
  ## Testing
23
27
 
24
- The metro bundler under `/example` is set up to use the libraries files under root.
25
- Which means, when you change something within `javascript/components/UserLocation.js`
28
+ The metro bundlers under [`/packages/react-native-app`](/packages/react-native-app) and [
29
+ `/packages/expo-app`](/packages/expo-app) is set up to use the libraries files under root.
30
+ Which means, when you change something within [
31
+ `/javascript/components/UserLocation.tsx`](/javascript/components/UserLocation.tsx)
26
32
  it will be reflected in any scene in example that uses that component.
27
33
 
28
34
  TODO: A better overview of how we use jest, detox, etc. (issue #22)
29
35
 
30
- ## Optional: Local development with yalc
36
+ ## Optional: Local development with `yalc`
31
37
 
32
38
  It is often desirable to test in the context of an external project (for example,
33
39
  if you have a complex application using a map and want to test your changes directly).
@@ -42,14 +48,14 @@ can mitigate some of the pain with this.
42
48
  - Make sure to use small concise commits
43
49
  - Use meaningful commit messages
44
50
  - Make sure to update/ add new tests for your changes
45
- - If you add a new feature, make sure to add a scene in `/example` for others to see/ test it
51
+ - If you add a new feature, make sure to add a scene in [`/packages/examples`](/packages/examples) for others to
52
+ see/test it
46
53
 
47
54
  ## Documentation
48
55
 
49
- Documentation is generated from code blocks and comments.
50
- It will be auto-generated when you commit changes.
51
- If any changes are generated from your edits, the changed files will need to be added using `git add` before attempting the commit again.
52
- To manually generate the changes, run `yarn generate`.
56
+ Documentation is generated from code blocks and comments. It will be auto-generated when you commit changes. If any
57
+ changes are generated from your edits, the changed files will need to be added using `git add` before attempting the
58
+ commit again. To manually generate the changes, run `yarn generate`.
53
59
 
54
- Notice, that changing the documentation in the individual <COMPONENT>.md within `/docs` will not suffice.
55
- The correct way is the above described
60
+ Notice, that changing the documentation in the individual <COMPONENT>.md within `/docs` will not suffice. The correct
61
+ way is the above described
package/README.md CHANGED
@@ -1,23 +1,17 @@
1
- ---
2
-
3
1
  [![MapLibre Logo](https://maplibre.org/img/maplibre-logo-big.svg)](https://maplibre.org)
4
2
 
3
+ # MapLibre React Native
5
4
 
6
- # MapLibre GL SDK for React Native
7
-
8
- _A React Native library for building maps with
9
- the [MapLibre GL Native SDK for iOS & Android](https://github.com/maplibre/maplibre-gl-native)_.
5
+ _React Native library for creating maps with [MapLibre Native for Android & iOS](https://github.com/maplibre/maplibre-gl-native)_.
10
6
 
11
7
  This project originated as a fork of [rnmapbox](https://github.com/rnmapbox/maps), a community-maintained
12
- React Native Library for building maps with the Mapbox iOS and Android mobile SDKs. The original product
8
+ React Native library for building maps with the Mapbox iOS and Android mobile SDKs. The original product
13
9
  supported both Mapbox and MapLibre for some time, but as the MapLibre and Mapbox SDKs have
14
10
  diverged, it has become necessary to separate the projects into specific wrappers by underlying renderer.
15
11
 
16
12
  ---
17
13
 
18
- [![npm version](https://badge.fury.io/js/%40maplibre%2Fmaplibre-react-native.svg)](https://badge.fury.io/js/%40maplibre%2Fmaplibre-react-native)
19
- [![Android Build](https://github.com/maplibre/maplibre-react-native/actions/workflows/android-actions.yml/badge.svg)](https://github.com/maplibre/maplibre-react-native/actions/workflows/android-actions.yml)
20
- [![iOS Build](https://github.com/maplibre/maplibre-react-native/actions/workflows/ios-actions.yml/badge.svg)](https://github.com/maplibre/maplibre-react-native/actions/workflows/ios-actions.yml)
14
+ [![npm version](https://badge.fury.io/js/%40maplibre%2Fmaplibre-react-native.svg)](https://badge.fury.io/js/%40maplibre%2Fmaplibre-react-native) [![Android Build](https://github.com/maplibre/maplibre-react-native/actions/workflows/android-actions.yml/badge.svg)](https://github.com/maplibre/maplibre-react-native/actions/workflows/android-actions.yml) [![iOS Build](https://github.com/maplibre/maplibre-react-native/actions/workflows/ios-actions.yml/badge.svg)](https://github.com/maplibre/maplibre-react-native/actions/workflows/ios-actions.yml)
21
15
 
22
16
  ---
23
17
 
@@ -34,7 +28,12 @@ diverged, it has become necessary to separate the projects into specific wrapper
34
28
 
35
29
  ## Documentation
36
30
 
37
- [Getting Started (start here)](/docs/GettingStarted.md)
31
+ - [Getting Started](/docs/GettingStarted.md)
32
+ - Installation
33
+ - React Native
34
+ - [Android](/android/install.md)
35
+ - [iOS](/ios/install.md)
36
+ - [Expo](/plugin/install.md)
38
37
 
39
38
  ### Components
40
39
 
@@ -79,8 +78,8 @@ diverged, it has become necessary to separate the projects into specific wrapper
79
78
  ## Contributing / local development
80
79
 
81
80
  Read the [CONTRIBUTING.md](CONTRIBUTING.md) guide in order to get familiar with how we do things around here and
82
- set up your local dev environment.
81
+ set up your local development environment.
83
82
 
84
83
  ## Community
85
84
 
86
- Join the #maplibre-react-native or #maplibre Slack channels at OSMUS: get an invite at https://slack.openstreetmap.us/
85
+ Join the `#maplibre-react-native` or `#maplibre` [Slack channels at OSMUS](https://slack.openstreetmap.us/).
@@ -2,10 +2,11 @@
2
2
 
3
3
  ## Access tokens
4
4
 
5
- Note that the Android SDK is slightly peculiar in that it
5
+ > [!NOTE]
6
+ > MapLibre Native for Android is slightly peculiar in that it
6
7
  _requires_ setting an access token, even though it will be `null` for
7
8
  most users (only Mapbox authenticates this way). Even if it feels odd,
8
- you have to have a line like this in your code before using the SDK.
9
+ you have to have a line like this in your code before using the library.
9
10
  You can put this near the top of your `App.js` for convenience.
10
11
 
11
12
  ```javascript
@@ -4,6 +4,10 @@ def safeExtGet(prop, fallback) {
4
4
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
5
5
  }
6
6
 
7
+ def isNewArchitectureEnabled() {
8
+ return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
9
+ }
10
+
7
11
  android {
8
12
  compileSdkVersion safeExtGet("compileSdkVersion", 33)
9
13
  buildToolsVersion safeExtGet("buildToolsVersion", '33.0.1')
@@ -13,6 +17,7 @@ android {
13
17
  targetSdkVersion safeExtGet('targetSdkVersion', 26)
14
18
  versionCode 1
15
19
  versionName "1.0"
20
+ buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
16
21
  }
17
22
 
18
23
  compileOptions {
@@ -2,12 +2,16 @@ package com.maplibre.rctmln.components;
2
2
 
3
3
  import android.view.ViewGroup;
4
4
 
5
+ import com.maplibre.rctmln.BuildConfig;
5
6
  import com.facebook.react.bridge.ReactApplicationContext;
6
7
  import com.facebook.react.common.MapBuilder;
7
8
  import com.facebook.react.uimanager.ThemedReactContext;
9
+ import com.facebook.react.uimanager.UIManagerHelper;
8
10
  import com.facebook.react.uimanager.UIManagerModule;
9
11
  import com.facebook.react.uimanager.ViewGroupManager;
10
12
  import com.facebook.react.uimanager.events.EventDispatcher;
13
+ import com.facebook.react.uimanager.common.UIManagerType;
14
+
11
15
  import com.maplibre.rctmln.events.IEvent;
12
16
 
13
17
  import java.util.HashMap;
@@ -45,7 +49,11 @@ abstract public class AbstractEventEmitter<T extends ViewGroup> extends ViewGrou
45
49
 
46
50
  @Override
47
51
  protected void addEventEmitters(ThemedReactContext context, @Nonnull T view) {
48
- mEventDispatcher = context.getNativeModule(UIManagerModule.class).getEventDispatcher();
52
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
53
+ mEventDispatcher = UIManagerHelper.getUIManager(context, UIManagerType.FABRIC).getEventDispatcher();
54
+ } else {
55
+ mEventDispatcher = context.getNativeModule(UIManagerModule.class).getEventDispatcher();
56
+ }
49
57
  }
50
58
 
51
59
  @Nullable
@@ -18,7 +18,7 @@ import com.maplibre.rctmln.location.LocationManager;
18
18
 
19
19
  @ReactModule(name = RCTMLNLocationModule.REACT_CLASS)
20
20
  public class RCTMLNLocationModule extends ReactContextBaseJavaModule {
21
- public static final String REACT_CLASS = "RCTMLNLocationModule";
21
+ public static final String REACT_CLASS = "MLNLocationModule";
22
22
  public static final String LOCATION_UPDATE = "MapboxUserLocationUpdate";
23
23
 
24
24
  private boolean isEnabled;
@@ -13,7 +13,7 @@ import android.util.Log;
13
13
 
14
14
  @ReactModule(name = RCTMLNLogging.REACT_CLASS)
15
15
  public class RCTMLNLogging extends ReactContextBaseJavaModule {
16
- public static final String REACT_CLASS = "RCTMLNLogging";
16
+ public static final String REACT_CLASS = "MLNLogging";
17
17
  private ReactApplicationContext mReactContext;
18
18
 
19
19
  public RCTMLNLogging(ReactApplicationContext reactApplicationContext) {
@@ -36,7 +36,7 @@ import javax.annotation.Nullable;
36
36
 
37
37
  @ReactModule(name = RCTMLNModule.REACT_CLASS)
38
38
  public class RCTMLNModule extends ReactContextBaseJavaModule {
39
- public static final String REACT_CLASS = "RCTMLNModule";
39
+ public static final String REACT_CLASS = "MLNModule";
40
40
 
41
41
  private static boolean customHeaderInterceptorAdded = false;
42
42
 
@@ -38,7 +38,7 @@ import java.util.Locale;
38
38
 
39
39
  @ReactModule(name = RCTMLNOfflineModule.REACT_CLASS)
40
40
  public class RCTMLNOfflineModule extends ReactContextBaseJavaModule {
41
- public static final String REACT_CLASS = "RCTMLNOfflineModule";
41
+ public static final String REACT_CLASS = "MLNOfflineModule";
42
42
 
43
43
  public static final int INACTIVE_REGION_DOWNLOAD_STATE = OfflineRegion.STATE_INACTIVE;
44
44
  public static final int ACTIVE_REGION_DOWNLOAD_STATE = OfflineRegion.STATE_ACTIVE;
@@ -40,7 +40,7 @@ import static android.content.Context.CONTEXT_IGNORE_SECURITY;
40
40
 
41
41
  @ReactModule(name = RCTMLNSnapshotModule.REACT_CLASS)
42
42
  public class RCTMLNSnapshotModule extends ReactContextBaseJavaModule {
43
- public static final String REACT_CLASS = "RCTMLNSnapshotModule";
43
+ public static final String REACT_CLASS = "MLNSnapshotModule";
44
44
 
45
45
  private ReactApplicationContext mContext;
46
46
 
package/babel.config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- presets: ["module:metro-react-native-babel-preset"],
2
+ presets: ["module:@react-native/babel-preset"],
3
3
  plugins: [
4
4
  ["@babel/plugin-proposal-class-properties", { loose: true }],
5
5
  ["@babel/plugin-transform-private-methods", { loose: true }],
package/docs/Camera.md CHANGED
@@ -19,7 +19,7 @@
19
19
  | maxZoomLevel | `number` | `none` | `false` | The maximun zoom level of the map |
20
20
  | maxBounds | `CameraBounds` | `none` | `false` | Restrict map panning so that the center is within these bounds |
21
21
  | followUserLocation | `boolean` | `none` | `false` | Should the map orientation follow the user's. |
22
- | followUserMode | `UserTrackingMode` | `none` | `false` | The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `MapLibreGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](../example/src/examples/Camera/SetUserTrackingModes.js) |
22
+ | followUserMode | `UserTrackingMode` | `none` | `false` | The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `MapLibreGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](/packages/examples/src/examples/Camera/SetUserTrackingModes.js) |
23
23
  | followZoomLevel | `number` | `none` | `false` | The zoomLevel on map while followUserLocation is set to `true` |
24
24
  | followPitch | `number` | `none` | `false` | The pitch on map while followUserLocation is set to `true` |
25
25
  | followHeading | `number` | `none` | `false` | The heading on map while followUserLocation is set to `true` |
@@ -1,8 +1,7 @@
1
1
  # Getting Started
2
2
 
3
- Congratulations, you successfully installed maplibre-react-native! 🎉
4
- This quickstart guide provides a zero-to-map intro, and from there you can check out the
5
- [examples](/example) folder if you want to jump in the deep end.
3
+ This quickstart guide provides a zero-to-map intro using React Native. From there you can check out the
4
+ [examples](/packages/examples) folder if you want to jump in the deep end.
6
5
 
7
6
  ## Prerequisites
8
7
 
@@ -41,7 +40,7 @@ yarn add @maplibre/maplibre-react-native
41
40
  npm install @maplibre/maplibre-react-native --save
42
41
  ```
43
42
 
44
- ### Review platform specific info
43
+ ### Review platform specific Details
45
44
 
46
45
  Check out the installation guide(s) for additional information about platform-specific setup, quirks,
47
46
  and steps required before running.
package/docs/MapView.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- This file was autogenerated from MapView.js do not modify -->
2
2
  ## <MapLibreGL.MapView />
3
- ### MapView backed by MapLibre GL Native
3
+ ### MapView backed by MapLibre Native
4
4
 
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
@@ -16,16 +16,10 @@
16
16
  | pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map |
17
17
  | rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map |
18
18
  | attributionEnabled | `boolean` | `true` | `false` | Enable/Disable attribution on map.<br/><br/>This must be enabled for Mapbox-hosted tiles and styles. Please refer to the Mapbox Terms of Service.<br/>Other providers do not require this. |
19
- | attributionPosition | `\| { top?: number; left?: number }
20
- \| { top?: number; right?: number }
21
- \| { bottom?: number; left?: number }
22
- \| { bottom?: number; right?: number }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
19
+ | attributionPosition | `{ top?: number; left?: number } \| { top?: number; right?: number } \| { bottom?: number; left?: number } \| { bottom?: number; right?: number }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
23
20
  | tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor |
24
21
  | logoEnabled | `boolean` | `false` | `false` | Enable/Disable the logo on the map. |
25
- | logoPosition | `\| { top?: number; left?: number }
26
- \| { top?: number; right?: number }
27
- \| { bottom?: number; left?: number }
28
- \| { bottom?: number; right?: number }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
22
+ | logoPosition | `{ top?: number; left?: number } \| { top?: number; right?: number } \| { bottom?: number; left?: number } \| { bottom?: number; right?: number }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
29
23
  | compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map |
30
24
  | compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
31
25
  | compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
@@ -7,10 +7,7 @@
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
9
9
  | url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. |
10
- | shape | `\| GeoJSON.GeometryCollection
11
- \| GeoJSON.Feature
12
- \| GeoJSON.FeatureCollection
13
- \| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
10
+ | shape | `GeoJSON.GeometryCollection \| GeoJSON.Feature \| GeoJSON.FeatureCollection \| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
14
11
  | cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. |
15
12
  | clusterRadius | `number` | `none` | `false` | Specifies the radius of each cluster if clustering is enabled.<br/>A value of 512 produces a radius equal to the width of a tile.<br/>The default value is 50. |
16
13
  | clusterMaxZoomLevel | `number` | `none` | `false` | Specifies the maximum zoom level at which to cluster points if clustering is enabled.<br/>Defaults to one zoom level less than the value of maxZoomLevel so that, at the maximum zoom level,<br/>the shapes are not clustered. |
@@ -50,7 +47,7 @@ Returns the zoom needed to expand the cluster.
50
47
  ##### arguments
51
48
  | Name | Type | Required | Description |
52
49
  | ---- | :--: | :------: | :----------: |
53
- | `feature` | `Feature` | `Yes` | The feature cluster to expand. |
50
+ | `feature` | `GeoJSON.Feature` | `Yes` | The feature cluster to expand. |
54
51
 
55
52
 
56
53
 
@@ -66,7 +63,7 @@ Returns the FeatureCollection from the cluster.
66
63
  ##### arguments
67
64
  | Name | Type | Required | Description |
68
65
  | ---- | :--: | :------: | :----------: |
69
- | `feature` | `Feature` | `Yes` | The feature cluster to expand. |
66
+ | `feature` | `GeoJSON.Feature` | `Yes` | The feature cluster to expand. |
70
67
  | `limit` | `number` | `Yes` | The number of points to return. |
71
68
  | `offset` | `number` | `Yes` | The amount of points to skip (for pagination). |
72
69
 
@@ -84,7 +81,7 @@ Returns the FeatureCollection from the cluster (on the next zoom level).
84
81
  ##### arguments
85
82
  | Name | Type | Required | Description |
86
83
  | ---- | :--: | :------: | :----------: |
87
- | `feature` | `Feature` | `Yes` | The feature cluster to expand. |
84
+ | `feature` | `GeoJSON.Feature` | `Yes` | The feature cluster to expand. |
88
85
 
89
86
 
90
87
 
package/docs/docs.json CHANGED
@@ -528,7 +528,7 @@
528
528
  "required": false,
529
529
  "type": "UserTrackingMode",
530
530
  "default": "none",
531
- "description": "The mode used to track the user location on the map. One of; \"normal\", \"compass\", \"course\". Each mode string is also available as a member on the `MapLibreGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](../example/src/examples/Camera/SetUserTrackingModes.js)"
531
+ "description": "The mode used to track the user location on the map. One of; \"normal\", \"compass\", \"course\". Each mode string is also available as a member on the `MapLibreGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](/packages/examples/src/examples/Camera/SetUserTrackingModes.js)"
532
532
  },
533
533
  {
534
534
  "name": "followZoomLevel",
@@ -2068,7 +2068,7 @@
2068
2068
  ]
2069
2069
  },
2070
2070
  "MapView": {
2071
- "description": "MapView backed by MapLibre GL Native",
2071
+ "description": "MapView backed by MapLibre Native",
2072
2072
  "displayName": "MapView",
2073
2073
  "methods": [
2074
2074
  {
@@ -3078,7 +3078,7 @@
3078
3078
  "methods": [
3079
3079
  {
3080
3080
  "name": "features",
3081
- "docblock": "Returns all features from the source that match the query parameters regardless of whether or not the feature is\ncurrently rendered on the map.\n\n@example\nshapeSource.features()\n\n@param {Array=} filter - an optional filter statement to filter the returned Features.\n@return {FeatureCollection}",
3081
+ "docblock": "Returns all features from the source that match the query parameters regardless of whether or not the feature is\ncurrently rendered on the map.\n\n@example\nshapeSource.features()\n\n@param {Array=} filter - an optional filter statement to filter the returned Features.\n@return {GeoJSON.FeatureCollection}",
3082
3082
  "modifiers": [
3083
3083
  "async"
3084
3084
  ],
@@ -3098,10 +3098,10 @@
3098
3098
  "name": "Promise",
3099
3099
  "elements": [
3100
3100
  {
3101
- "name": "FeatureCollection"
3101
+ "name": "GeoJSON.FeatureCollection"
3102
3102
  }
3103
3103
  ],
3104
- "raw": "Promise<FeatureCollection>"
3104
+ "raw": "Promise<GeoJSON.FeatureCollection>"
3105
3105
  }
3106
3106
  },
3107
3107
  "description": "Returns all features from the source that match the query parameters regardless of whether or not the feature is\ncurrently rendered on the map.",
@@ -3111,7 +3111,7 @@
3111
3111
  },
3112
3112
  {
3113
3113
  "name": "getClusterExpansionZoom",
3114
- "docblock": "Returns the zoom needed to expand the cluster.\n\n@example\nconst zoom = await shapeSource.getClusterExpansionZoom(clusterId);\n\n@param {Feature} feature - The feature cluster to expand.\n@return {number}",
3114
+ "docblock": "Returns the zoom needed to expand the cluster.\n\n@example\nconst zoom = await shapeSource.getClusterExpansionZoom(clusterId);\n\n@param {GeoJSON.Feature} feature - The feature cluster to expand.\n@return {number}",
3115
3115
  "modifiers": [
3116
3116
  "async"
3117
3117
  ],
@@ -3120,7 +3120,7 @@
3120
3120
  "name": "feature",
3121
3121
  "description": "The feature cluster to expand.",
3122
3122
  "type": {
3123
- "name": "Feature"
3123
+ "name": "GeoJSON.Feature"
3124
3124
  },
3125
3125
  "optional": false
3126
3126
  }
@@ -3144,7 +3144,7 @@
3144
3144
  },
3145
3145
  {
3146
3146
  "name": "getClusterLeaves",
3147
- "docblock": "Returns the FeatureCollection from the cluster.\n\n@example\nconst collection = await shapeSource.getClusterLeaves(clusterId, limit, offset);\n\n@param {Feature} feature - The feature cluster to expand.\n@param {number} limit - The number of points to return.\n@param {number} offset - The amount of points to skip (for pagination).\n@return {FeatureCollection}",
3147
+ "docblock": "Returns the FeatureCollection from the cluster.\n\n@example\nconst collection = await shapeSource.getClusterLeaves(clusterId, limit, offset);\n\n@param {GeoJSON.Feature} feature - The feature cluster to expand.\n@param {number} limit - The number of points to return.\n@param {number} offset - The amount of points to skip (for pagination).\n@return {GeoJSON.FeatureCollection}",
3148
3148
  "modifiers": [
3149
3149
  "async"
3150
3150
  ],
@@ -3153,7 +3153,7 @@
3153
3153
  "name": "feature",
3154
3154
  "description": "The feature cluster to expand.",
3155
3155
  "type": {
3156
- "name": "Feature"
3156
+ "name": "GeoJSON.Feature"
3157
3157
  },
3158
3158
  "optional": false
3159
3159
  },
@@ -3180,10 +3180,10 @@
3180
3180
  "name": "Promise",
3181
3181
  "elements": [
3182
3182
  {
3183
- "name": "FeatureCollection"
3183
+ "name": "GeoJSON.FeatureCollection"
3184
3184
  }
3185
3185
  ],
3186
- "raw": "Promise<FeatureCollection>"
3186
+ "raw": "Promise<GeoJSON.FeatureCollection>"
3187
3187
  }
3188
3188
  },
3189
3189
  "description": "Returns the FeatureCollection from the cluster.",
@@ -3193,7 +3193,7 @@
3193
3193
  },
3194
3194
  {
3195
3195
  "name": "getClusterChildren",
3196
- "docblock": "Returns the FeatureCollection from the cluster (on the next zoom level).\n\n@example\nconst collection = await shapeSource.getClusterChildren(clusterId);\n\n@param {Feature} feature - The feature cluster to expand.\n@return {FeatureCollection}",
3196
+ "docblock": "Returns the FeatureCollection from the cluster (on the next zoom level).\n\n@example\nconst collection = await shapeSource.getClusterChildren(clusterId);\n\n@param {GeoJSON.Feature} feature - The feature cluster to expand.\n@return {GeoJSON.FeatureCollection}",
3197
3197
  "modifiers": [
3198
3198
  "async"
3199
3199
  ],
@@ -3202,7 +3202,7 @@
3202
3202
  "name": "feature",
3203
3203
  "description": "The feature cluster to expand.",
3204
3204
  "type": {
3205
- "name": "Feature"
3205
+ "name": "GeoJSON.Feature"
3206
3206
  },
3207
3207
  "optional": false
3208
3208
  }
@@ -3213,10 +3213,10 @@
3213
3213
  "name": "Promise",
3214
3214
  "elements": [
3215
3215
  {
3216
- "name": "FeatureCollection"
3216
+ "name": "GeoJSON.FeatureCollection"
3217
3217
  }
3218
3218
  ],
3219
- "raw": "Promise<FeatureCollection>"
3219
+ "raw": "Promise<GeoJSON.FeatureCollection>"
3220
3220
  }
3221
3221
  },
3222
3222
  "description": "Returns the FeatureCollection from the cluster (on the next zoom level).",