@maplibre/maplibre-react-native 8.6.0-beta.1 → 9.0.0

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 (75) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +1 -7
  4. package/android/install.md +3 -3
  5. package/android/rctmgl/build.gradle +1 -1
  6. package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +33 -0
  7. package/app.plugin.js +1 -1
  8. package/docs/Annotation.md +1 -1
  9. package/docs/Annotations.md +3 -8
  10. package/docs/BackgroundLayer.md +2 -2
  11. package/docs/Callout.md +1 -1
  12. package/docs/Camera.md +2 -2
  13. package/docs/CircleLayer.md +31 -14
  14. package/docs/CustomHttpHeaders.md +9 -9
  15. package/docs/FillExtrusionLayer.md +2 -2
  16. package/docs/FillLayer.md +27 -10
  17. package/docs/GettingStarted.md +6 -8
  18. package/docs/HeadingIndicator.md +1 -1
  19. package/docs/HeatmapLayer.md +2 -2
  20. package/docs/ImageSource.md +1 -1
  21. package/docs/Images.md +1 -1
  22. package/docs/Light.md +1 -1
  23. package/docs/LineLayer.md +31 -14
  24. package/docs/{MapboxGL.md → MapLibreGL.md} +5 -5
  25. package/docs/MapView.md +5 -5
  26. package/docs/MarkerView.md +1 -1
  27. package/docs/NativeUserLocation.md +1 -1
  28. package/docs/OfflineManager.md +16 -16
  29. package/docs/PointAnnotation.md +1 -1
  30. package/docs/RasterLayer.md +2 -2
  31. package/docs/RasterSource.md +2 -2
  32. package/docs/ShapeSource.md +2 -2
  33. package/docs/Style.md +3 -3
  34. package/docs/StyleSheet.md +93 -72
  35. package/docs/SymbolLayer.md +17 -13
  36. package/docs/UserLocation.md +2 -2
  37. package/docs/VectorSource.md +2 -2
  38. package/docs/docs.json +102 -46
  39. package/docs/snapshotManager.md +7 -7
  40. package/index.d.ts +8 -7
  41. package/ios/RCTMGL/RCTMGLStyle.h +3 -0
  42. package/ios/RCTMGL/RCTMGLStyle.m +23 -2
  43. package/ios/RCTMGL/index.d.ts +24 -5
  44. package/ios/install.md +12 -4
  45. package/javascript/components/BackgroundLayer.js +2 -2
  46. package/javascript/components/Camera.js +6 -6
  47. package/javascript/components/CircleLayer.js +2 -2
  48. package/javascript/components/FillExtrusionLayer.js +2 -2
  49. package/javascript/components/FillLayer.js +2 -2
  50. package/javascript/components/HeatmapLayer.js +2 -2
  51. package/javascript/components/LineLayer.js +2 -2
  52. package/javascript/components/MapView.js +38 -41
  53. package/javascript/components/RasterLayer.js +2 -2
  54. package/javascript/components/RasterSource.js +2 -2
  55. package/javascript/components/ShapeSource.js +2 -2
  56. package/javascript/components/Style.js +3 -3
  57. package/javascript/components/SymbolLayer.js +2 -2
  58. package/javascript/components/UserLocation.js +2 -0
  59. package/javascript/components/VectorSource.js +2 -2
  60. package/javascript/index.js +38 -42
  61. package/javascript/modules/location/locationManager.js +8 -8
  62. package/javascript/modules/offline/OfflinePack.js +4 -4
  63. package/javascript/modules/offline/offlineManager.js +34 -34
  64. package/javascript/modules/snapshot/SnapshotOptions.js +2 -2
  65. package/javascript/modules/snapshot/snapshotManager.js +8 -8
  66. package/javascript/utils/styleMap.js +37 -6
  67. package/maplibre-react-native.podspec +1 -1
  68. package/package.json +5 -5
  69. package/plugin/build/{withMapbox.d.ts → withMapLibre.d.ts} +1 -1
  70. package/plugin/build/{withMapbox.js → withMapLibre.js} +7 -7
  71. package/plugin/install.md +1 -1
  72. package/scripts/download-style-spec.sh +2 -2
  73. package/scripts/templates/component.md.ejs +1 -1
  74. package/scripts/templates/styleMap.js.ejs +1 -1
  75. package/style-spec/v8.json +266 -43
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ Please add unreleased changes in the following style:
5
5
  PR Title ([#123](link to my pr))
6
6
  ```
7
7
 
8
+ ## 9.0.0
9
+
10
+ Completed fork from RNMapbox, removed support for the proprietary Mapbox SDK, and updated to the latest
11
+ MapLibre GL Native SDKs for iOS and Android.
12
+
13
+ Breaking changes: Mapbox-specific names have been renamed to MapLibre.
14
+
8
15
  ## 8.6.0-beta.0
9
16
 
10
17
  fix: add TypeScript type for MapViews's preferredFramesPerSecond prop ([#1717](https://github.com/rnmapbox/maps/pull/1717))
package/CONTRIBUTING.md CHANGED
@@ -48,7 +48,7 @@ can mitigate some of the pain with this.
48
48
  Documentation is generated from code blocks and comments.
49
49
  It will be auto-generated when you commit changes.
50
50
  If any changes are generated from your edits, the changed files will need to be added using `git add` before attempting the commit again.
51
- To manually generate the changes, run `npm run generate`.
51
+ To manually generate the changes, run `yarn generate`.
52
52
 
53
53
  Notice, that changing the documentation in the individual <COMPONENT>.md within `/docs` will not suffice.
54
54
  The correct way is the above described
package/README.md CHANGED
@@ -13,8 +13,6 @@ React Native Library for building maps with the Mapbox iOS and Android mobile SD
13
13
  supported both Mapbox and MapLibre for some time, but as the MapLibre and Mapbox SDKs have
14
14
  diverged, it has become necessary to separate the projects into specific wrappers by underlying renderer.
15
15
 
16
- **This project is in the process of being onboarded and prepared for broad use by the MapLibre community. PRs and tickets welcomed.** Track the status over at: https://github.com/maplibre/maplibre/issues/134
17
-
18
16
  ---
19
17
 
20
18
  [![npm version](https://badge.fury.io/js/%40maplibre%2Fmaplibre-react-native.svg)](https://badge.fury.io/js/%40maplibre%2Fmaplibre-react-native)
@@ -74,14 +72,10 @@ diverged, it has become necessary to separate the projects into specific wrapper
74
72
 
75
73
  ### Misc
76
74
 
77
- - [MapboxGL](/docs/MapboxGL.md)
75
+ - [MapLibreGL](/docs/MapLibreGL.md)
78
76
  - [CustomHttpHeaders](/docs/CustomHttpHeaders.md)
79
77
  - [Logger](/docs/Logger.md)
80
78
 
81
- ## Expo Support
82
-
83
- This package is not available in the [Expo Go](https://expo.io/client) app. Learn how you can use it with [custom dev clients](/plugin/install.md).
84
-
85
79
  ## Contributing / local development
86
80
 
87
81
  Read the [CONTRIBUTING.md](CONTRIBUTING.md) guide in order to get familiar with how we do things around here and
@@ -9,7 +9,7 @@ you have to have a line like this in your code before using the SDK.
9
9
  You can put this near the top of your `App.js` for convenience.
10
10
 
11
11
  ```javascript
12
- MapboxGL.setAccessToken(null);
12
+ MapLibreGL.setAccessToken(null);
13
13
  ```
14
14
 
15
15
  ## Setting connection status
@@ -25,7 +25,7 @@ Manually sets the connectivity state of the app, bypassing any checks to the
25
25
  and `null` for the normal `ConnectivityManager` behavior.
26
26
 
27
27
  ```js
28
- import MapboxGL from "@maplibre/maplibre-react-native";
28
+ import MapLibreGL from "@maplibre/maplibre-react-native";
29
29
 
30
- MapboxGL.setConnected(true);
30
+ MapLibreGL.setConnected(true);
31
31
  ```
@@ -35,7 +35,7 @@ dependencies {
35
35
  implementation "com.facebook.react:react-native:+"
36
36
 
37
37
  // MapLibre SDK
38
- implementation "org.maplibre.gl:android-sdk:9.5.2"
38
+ implementation "org.maplibre.gl:android-sdk:9.6.0"
39
39
  implementation "org.maplibre.gl:android-sdk-turf:5.9.0"
40
40
 
41
41
  // Dependencies
@@ -36,6 +36,9 @@ public class RCTMGLStyleFactory {
36
36
  final RCTMGLStyleValue styleValue = style.getStyleValueForKey(styleKey);
37
37
 
38
38
  switch (styleKey) {
39
+ case "fillSortKey":
40
+ RCTMGLStyleFactory.setFillSortKey(layer, styleValue);
41
+ break;
39
42
  case "visibility":
40
43
  RCTMGLStyleFactory.setVisibility(layer, styleValue);
41
44
  break;
@@ -106,6 +109,9 @@ public class RCTMGLStyleFactory {
106
109
  case "lineRoundLimit":
107
110
  RCTMGLStyleFactory.setLineRoundLimit(layer, styleValue);
108
111
  break;
112
+ case "lineSortKey":
113
+ RCTMGLStyleFactory.setLineSortKey(layer, styleValue);
114
+ break;
109
115
  case "visibility":
110
116
  RCTMGLStyleFactory.setVisibility(layer, styleValue);
111
117
  break;
@@ -411,6 +417,9 @@ public class RCTMGLStyleFactory {
411
417
  final RCTMGLStyleValue styleValue = style.getStyleValueForKey(styleKey);
412
418
 
413
419
  switch (styleKey) {
420
+ case "circleSortKey":
421
+ RCTMGLStyleFactory.setCircleSortKey(layer, styleValue);
422
+ break;
414
423
  case "visibility":
415
424
  RCTMGLStyleFactory.setVisibility(layer, styleValue);
416
425
  break;
@@ -758,6 +767,14 @@ public class RCTMGLStyleFactory {
758
767
  }
759
768
  }
760
769
 
770
+ public static void setFillSortKey(FillLayer layer, RCTMGLStyleValue styleValue) {
771
+ if (styleValue.isExpression()) {
772
+ layer.setProperties(PropertyFactory.fillSortKey(styleValue.getExpression()));
773
+ } else {
774
+ layer.setProperties(PropertyFactory.fillSortKey(styleValue.getFloat(VALUE_KEY)));
775
+ }
776
+ }
777
+
761
778
  public static void setVisibility(FillLayer layer, RCTMGLStyleValue styleValue) {
762
779
  layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
763
780
  }
@@ -894,6 +911,14 @@ public class RCTMGLStyleFactory {
894
911
  }
895
912
  }
896
913
 
914
+ public static void setLineSortKey(LineLayer layer, RCTMGLStyleValue styleValue) {
915
+ if (styleValue.isExpression()) {
916
+ layer.setProperties(PropertyFactory.lineSortKey(styleValue.getExpression()));
917
+ } else {
918
+ layer.setProperties(PropertyFactory.lineSortKey(styleValue.getFloat(VALUE_KEY)));
919
+ }
920
+ }
921
+
897
922
  public static void setVisibility(LineLayer layer, RCTMGLStyleValue styleValue) {
898
923
  layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
899
924
  }
@@ -1606,6 +1631,14 @@ public class RCTMGLStyleFactory {
1606
1631
  }
1607
1632
  }
1608
1633
 
1634
+ public static void setCircleSortKey(CircleLayer layer, RCTMGLStyleValue styleValue) {
1635
+ if (styleValue.isExpression()) {
1636
+ layer.setProperties(PropertyFactory.circleSortKey(styleValue.getExpression()));
1637
+ } else {
1638
+ layer.setProperties(PropertyFactory.circleSortKey(styleValue.getFloat(VALUE_KEY)));
1639
+ }
1640
+ }
1641
+
1609
1642
  public static void setVisibility(CircleLayer layer, RCTMGLStyleValue styleValue) {
1610
1643
  layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
1611
1644
  }
package/app.plugin.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./plugin/build/withMapbox');
1
+ module.exports = require('./plugin/build/withMapLibre');
@@ -1,5 +1,5 @@
1
1
  <!-- This file was autogenerated from Annotation.js do not modify -->
2
- ## <MapboxGL.Annotation />
2
+ ## <MapLibreGL.Annotation />
3
3
  ###
4
4
 
5
5
  ### props
@@ -1,4 +1,4 @@
1
- Comparsion of various annotations available in React native mapbox:
1
+ Comparsion of various annotations available in MapLibre React Native:
2
2
 
3
3
  |*Feature* | *SymbolLayer* |*PointAnnotation* |*MarkerView* |*CircleLayer* |
4
4
  |-----------------------|--------------------|--------------------------------------|-------------------------|---------------------|
@@ -8,10 +8,5 @@ Comparsion of various annotations available in React native mapbox:
8
8
  |Control Z-index | &check; |iOS: always on top, android: n/a |always on top | &check; |
9
9
  |Clustering | &check; | | | &check; |
10
10
  |Style with expressions | &check; | | | &check; |
11
- |iOS implementation | [MGLStyleSymbolLayer](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLSymbolStyleLayer.html) |[MGLAnnotationView](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLAnnotationView.html) |[MGLAnnotationView](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLAnnotationView.html) |[MGLCircleStyleLayer](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLCircleStyleLayer.html) |
12
- |android implementation | [SymbolLayer](https://docs.mapbox.com/android/api/map-sdk/9.0.0/com/mapbox/mapboxsdk/style/layers/SymbolLayer.html)|[annotation.Symbol](https://docs.mapbox.com/android/api/plugins/annotation/0.8.0/com/mapbox/mapboxsdk/plugins/annotation/Symbol.html)|[annotation.Marker](https://docs.mapbox.com/android/api/plugins/markerview/0.4.0/com/mapbox/mapboxsdk/plugins/markerview/MarkerView.html) |[CircleLayer](https://docs.mapbox.com/android/api/map-sdk/9.0.0/com/mapbox/mapboxsdk/style/layers/CircleLayer.html)|
13
-
14
-
15
- Related links:
16
- * iOS [markers and annotations](https://docs.mapbox.com/ios/maps/overview/markers-and-annotations/)
17
- * android [annotation plugin](https://docs.mapbox.com/android/plugins/overview/annotation/)
11
+ |iOS implementation | [MGLSymbolStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLSymbolStyleLayer.html) |[MGLAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLAnnotationView.html) |[MGLAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLAnnotationView.html) |[MGLCircleStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLCircleStyleLayer.html) |
12
+ |android implementation | [SymbolLayer](https://maplibre.org/maplibre-gl-native/android/api/com/mapbox/mapboxsdk/style/layers/SymbolLayer.html)|[annotation.Symbol](https://docs.mapbox.com/android/api/plugins/annotation/0.8.0/com/mapbox/mapboxsdk/plugins/annotation/Symbol.html)|[annotation.Marker](https://docs.mapbox.com/android/api/plugins/markerview/0.4.0/com/mapbox/mapboxsdk/plugins/markerview/MarkerView.html) |[CircleLayer](https://maplibre.org/maplibre-gl-native/android/api/com/mapbox/mapboxsdk/style/layers/CircleLayer.html)|
@@ -1,12 +1,12 @@
1
1
  <!-- This file was autogenerated from BackgroundLayer.js do not modify -->
2
- ## <MapboxGL.BackgroundLayer />
2
+ ## <MapLibreGL.BackgroundLayer />
3
3
  ###
4
4
 
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
9
- | sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
9
+ | sourceID | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
10
10
  | sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
11
11
  | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
12
  | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
package/docs/Callout.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <!-- This file was autogenerated from Callout.js do not modify -->
2
- ## <MapboxGL.Callout />
2
+ ## <MapLibreGL.Callout />
3
3
  ### Callout that displays information about a selected annotation near the annotation.
4
4
 
5
5
  ### props
package/docs/Camera.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <!-- This file was autogenerated from Camera.js do not modify -->
2
- ## <MapboxGL.Camera />
2
+ ## <MapLibreGL.Camera />
3
3
  ###
4
4
 
5
5
  ### props
@@ -49,7 +49,7 @@
49
49
  | &nbsp;&nbsp;ne | `array` | `none` | `true` | northEastCoordinates - North east coordinate of bound |
50
50
  | &nbsp;&nbsp;sw | `array` | `none` | `true` | southWestCoordinates - South west coordinate of bound |
51
51
  | followUserLocation | `bool` | `none` | `false` | Should the map orientation follow the user's. |
52
- | followUserMode | `enum` | `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 `MapboxGL.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/SetUserTrackingModes.js) |
52
+ | followUserMode | `enum` | `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/SetUserTrackingModes.js) |
53
53
  | followZoomLevel | `number` | `none` | `false` | The zoomLevel on map while followUserLocation is set to `true` |
54
54
  | followPitch | `number` | `none` | `false` | The pitch on map while followUserLocation is set to `true` |
55
55
  | followHeading | `number` | `none` | `false` | The heading on map while followUserLocation is set to `true` |
@@ -1,12 +1,12 @@
1
1
  <!-- This file was autogenerated from CircleLayer.js do not modify -->
2
- ## <MapboxGL.CircleLayer />
2
+ ## <MapLibreGL.CircleLayer />
3
3
  ### CircleLayer is a style layer that renders one or more filled circles on the map.
4
4
 
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
9
- | sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
9
+ | sourceID | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
10
10
  | sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property<br/>from which the receiver obtains the data to style. |
11
11
  | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
12
  | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
@@ -19,18 +19,35 @@
19
19
 
20
20
  ### styles
21
21
 
22
- * <a href="#name">visibility</a><br/>
23
- * <a href="#name-1">circleRadius</a><br/>
24
- * <a href="#name-2">circleColor</a><br/>
25
- * <a href="#name-3">circleBlur</a><br/>
26
- * <a href="#name-4">circleOpacity</a><br/>
27
- * <a href="#name-5">circleTranslate</a><br/>
28
- * <a href="#name-6">circleTranslateAnchor</a><br/>
29
- * <a href="#name-7">circlePitchScale</a><br/>
30
- * <a href="#name-8">circlePitchAlignment</a><br/>
31
- * <a href="#name-9">circleStrokeWidth</a><br/>
32
- * <a href="#name-10">circleStrokeColor</a><br/>
33
- * <a href="#name-11">circleStrokeOpacity</a><br/>
22
+ * <a href="#name">circleSortKey</a><br/>
23
+ * <a href="#name-1">visibility</a><br/>
24
+ * <a href="#name-2">circleRadius</a><br/>
25
+ * <a href="#name-3">circleColor</a><br/>
26
+ * <a href="#name-4">circleBlur</a><br/>
27
+ * <a href="#name-5">circleOpacity</a><br/>
28
+ * <a href="#name-6">circleTranslate</a><br/>
29
+ * <a href="#name-7">circleTranslateAnchor</a><br/>
30
+ * <a href="#name-8">circlePitchScale</a><br/>
31
+ * <a href="#name-9">circlePitchAlignment</a><br/>
32
+ * <a href="#name-10">circleStrokeWidth</a><br/>
33
+ * <a href="#name-11">circleStrokeColor</a><br/>
34
+ * <a href="#name-12">circleStrokeOpacity</a><br/>
35
+
36
+ ___
37
+
38
+ #### Name
39
+ `circleSortKey`
40
+
41
+ #### Description
42
+ Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
43
+
44
+ #### Type
45
+ `number`
46
+
47
+
48
+ #### Expression
49
+
50
+ Parameters: `zoom, feature`
34
51
 
35
52
  ___
36
53
 
@@ -54,31 +54,31 @@ You can add and remove headers at runtime.
54
54
  #### To add a header
55
55
 
56
56
  ```javascript
57
- MapboxGL.addCustomHeader('Authorization', '{auth header}');
57
+ MapLibreGL.addCustomHeader('Authorization', '{auth header}');
58
58
  ```
59
59
 
60
60
  #### To remove a header
61
61
 
62
62
  ```javascript
63
- MapboxGL.removeCustomHeader('Authorization');
63
+ MapLibreGL.removeCustomHeader('Authorization');
64
64
  ```
65
65
 
66
66
  #### Working example
67
67
 
68
68
  ```javascript
69
69
  export default class HelloWorldApp extends Component {
70
- componentDidMount() {
71
- MapboxGL.addCustomHeader('Authorization', '{auth header}');
70
+ componentDidMount () {
71
+ MapLibreGL.addCustomHeader('Authorization', '{auth header}');
72
72
  }
73
73
 
74
- render() {
75
- MapboxGL.addCustomHeader('X-Some-Header', 'my-value');
74
+ render () {
75
+ MapLibreGL.addCustomHeader('X-Some-Header', 'my-value');
76
76
  return (
77
77
  <View style={styles.page}>
78
78
  <View style={styles.container}>
79
- <MapboxGL.MapView
80
- style={styles.map}
81
- styleURL={STYLE_URL} />
79
+ <MapLibreGL.MapView
80
+ style={styles.map}
81
+ styleURL={STYLE_URL}/>
82
82
  </View>
83
83
  </View>
84
84
  );
@@ -1,12 +1,12 @@
1
1
  <!-- This file was autogenerated from FillExtrusionLayer.js do not modify -->
2
- ## <MapboxGL.FillExtrusionLayer />
2
+ ## <MapLibreGL.FillExtrusionLayer />
3
3
  ### FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.
4
4
 
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
9
- | sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
9
+ | sourceID | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
10
10
  | sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
11
11
  | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
12
  | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
package/docs/FillLayer.md CHANGED
@@ -1,12 +1,12 @@
1
1
  <!-- This file was autogenerated from FillLayer.js do not modify -->
2
- ## <MapboxGL.FillLayer />
2
+ ## <MapLibreGL.FillLayer />
3
3
  ### FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map.
4
4
 
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
9
- | sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
9
+ | sourceID | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
10
10
  | sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
11
11
  | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
12
  | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
@@ -19,14 +19,31 @@
19
19
 
20
20
  ### styles
21
21
 
22
- * <a href="#name">visibility</a><br/>
23
- * <a href="#name-1">fillAntialias</a><br/>
24
- * <a href="#name-2">fillOpacity</a><br/>
25
- * <a href="#name-3">fillColor</a><br/>
26
- * <a href="#name-4">fillOutlineColor</a><br/>
27
- * <a href="#name-5">fillTranslate</a><br/>
28
- * <a href="#name-6">fillTranslateAnchor</a><br/>
29
- * <a href="#name-7">fillPattern</a><br/>
22
+ * <a href="#name">fillSortKey</a><br/>
23
+ * <a href="#name-1">visibility</a><br/>
24
+ * <a href="#name-2">fillAntialias</a><br/>
25
+ * <a href="#name-3">fillOpacity</a><br/>
26
+ * <a href="#name-4">fillColor</a><br/>
27
+ * <a href="#name-5">fillOutlineColor</a><br/>
28
+ * <a href="#name-6">fillTranslate</a><br/>
29
+ * <a href="#name-7">fillTranslateAnchor</a><br/>
30
+ * <a href="#name-8">fillPattern</a><br/>
31
+
32
+ ___
33
+
34
+ #### Name
35
+ `fillSortKey`
36
+
37
+ #### Description
38
+ Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
39
+
40
+ #### Type
41
+ `number`
42
+
43
+
44
+ #### Expression
45
+
46
+ Parameters: `zoom, feature`
30
47
 
31
48
  ___
32
49
 
@@ -17,16 +17,14 @@ This quickstart guide provides a zero-to-map intro, and from there you can check
17
17
 
18
18
  ## Installation
19
19
 
20
- ### Step 0: Set up a React Native project
20
+ ### Set up a React Native project
21
21
 
22
22
  If you don't have an existing React Native project, create one:
23
23
 
24
24
  ```shell
25
- npx react-native init MyApp --version 0.68
25
+ npx react-native init MyApp
26
26
  ```
27
27
 
28
- TODO: See if latest version works
29
-
30
28
  ### Install Package
31
29
 
32
30
  From your React Native project's root directory, add the package via
@@ -46,7 +44,7 @@ npm install @maplibre/maplibre-react-native --save
46
44
  ### Review platform specific info
47
45
 
48
46
  Check out the installation guide(s) for additional information about platform-specific setup, quirks,
49
- and steps requried before running.
47
+ and steps required before running.
50
48
 
51
49
  - [Android](/android/install.md)
52
50
  - [iOS](/ios/install.md)
@@ -59,11 +57,11 @@ Here is an example minimal App.js
59
57
  ```js
60
58
  import React, {Component} from 'react';
61
59
  import {StyleSheet, View} from 'react-native';
62
- import MapboxGL from '@maplibre/maplibre-react-native';
60
+ import MapLibreGL from '@maplibre/maplibre-react-native';
63
61
 
64
62
  // Will be null for most users (only Mapbox authenticates this way).
65
63
  // Required on Android. See Android installation notes.
66
- MapboxGL.setAccessToken(null);
64
+ MapLibreGL.setAccessToken(null);
67
65
 
68
66
  const styles = StyleSheet.create({
69
67
  page: {
@@ -82,7 +80,7 @@ export default class App extends Component {
82
80
  render() {
83
81
  return (
84
82
  <View style={styles.page}>
85
- <MapboxGL.MapView
83
+ <MapLibreGL.MapView
86
84
  style={styles.map}
87
85
  logoEnabled={false}
88
86
  styleURL="https://demotiles.maplibre.org/style.json"
@@ -1,5 +1,5 @@
1
1
  <!-- This file was autogenerated from HeadingIndicator.js do not modify -->
2
- ## <MapboxGL.HeadingIndicator />
2
+ ## <MapLibreGL.HeadingIndicator />
3
3
  ###
4
4
 
5
5
  ### props
@@ -1,12 +1,12 @@
1
1
  <!-- This file was autogenerated from HeatmapLayer.js do not modify -->
2
- ## <MapboxGL.HeatmapLayer />
2
+ ## <MapLibreGL.HeatmapLayer />
3
3
  ### HeatmapLayer is a style layer that renders one or more filled circles on the map.
4
4
 
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
9
- | sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
9
+ | sourceID | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
10
10
  | sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property<br/>from which the receiver obtains the data to style. |
11
11
  | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
12
  | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
@@ -1,5 +1,5 @@
1
1
  <!-- This file was autogenerated from ImageSource.js do not modify -->
2
- ## <MapboxGL.ImageSource />
2
+ ## <MapLibreGL.ImageSource />
3
3
  ### ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.<br/>The georeferenced image scales and rotates as the user zooms and rotates the map
4
4
 
5
5
  ### props
package/docs/Images.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <!-- This file was autogenerated from Images.js do not modify -->
2
- ## <MapboxGL.Images />
2
+ ## <MapLibreGL.Images />
3
3
  ### Images defines the images used in Symbol etc layers
4
4
 
5
5
  ### props
package/docs/Light.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <!-- This file was autogenerated from Light.js do not modify -->
2
- ## <MapboxGL.Light />
2
+ ## <MapLibreGL.Light />
3
3
  ### Light represents the light source for extruded geometries
4
4
 
5
5
  ### props
package/docs/LineLayer.md CHANGED
@@ -1,12 +1,12 @@
1
1
  <!-- This file was autogenerated from LineLayer.js do not modify -->
2
- ## <MapboxGL.LineLayer />
2
+ ## <MapLibreGL.LineLayer />
3
3
  ### LineLayer is a style layer that renders one or more stroked polylines on the map.
4
4
 
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
9
- | sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
9
+ | sourceID | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
10
10
  | sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
11
11
  | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
12
  | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
@@ -23,18 +23,19 @@
23
23
  * <a href="#name-1">lineJoin</a><br/>
24
24
  * <a href="#name-2">lineMiterLimit</a><br/>
25
25
  * <a href="#name-3">lineRoundLimit</a><br/>
26
- * <a href="#name-4">visibility</a><br/>
27
- * <a href="#name-5">lineOpacity</a><br/>
28
- * <a href="#name-6">lineColor</a><br/>
29
- * <a href="#name-7">lineTranslate</a><br/>
30
- * <a href="#name-8">lineTranslateAnchor</a><br/>
31
- * <a href="#name-9">lineWidth</a><br/>
32
- * <a href="#name-10">lineGapWidth</a><br/>
33
- * <a href="#name-11">lineOffset</a><br/>
34
- * <a href="#name-12">lineBlur</a><br/>
35
- * <a href="#name-13">lineDasharray</a><br/>
36
- * <a href="#name-14">linePattern</a><br/>
37
- * <a href="#name-15">lineGradient</a><br/>
26
+ * <a href="#name-4">lineSortKey</a><br/>
27
+ * <a href="#name-5">visibility</a><br/>
28
+ * <a href="#name-6">lineOpacity</a><br/>
29
+ * <a href="#name-7">lineColor</a><br/>
30
+ * <a href="#name-8">lineTranslate</a><br/>
31
+ * <a href="#name-9">lineTranslateAnchor</a><br/>
32
+ * <a href="#name-10">lineWidth</a><br/>
33
+ * <a href="#name-11">lineGapWidth</a><br/>
34
+ * <a href="#name-12">lineOffset</a><br/>
35
+ * <a href="#name-13">lineBlur</a><br/>
36
+ * <a href="#name-14">lineDasharray</a><br/>
37
+ * <a href="#name-15">linePattern</a><br/>
38
+ * <a href="#name-16">lineGradient</a><br/>
38
39
 
39
40
  ___
40
41
 
@@ -122,6 +123,22 @@ Parameters: `zoom`
122
123
 
123
124
  ___
124
125
 
126
+ #### Name
127
+ `lineSortKey`
128
+
129
+ #### Description
130
+ Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
131
+
132
+ #### Type
133
+ `number`
134
+
135
+
136
+ #### Expression
137
+
138
+ Parameters: `zoom, feature`
139
+
140
+ ___
141
+
125
142
  #### Name
126
143
  `visibility`
127
144
 
@@ -1,4 +1,4 @@
1
- ## MapboxGL
1
+ ## MapLibreGL
2
2
  ###
3
3
 
4
4
  ### methods
@@ -7,7 +7,7 @@
7
7
  ##### arguments
8
8
  | Name | Type | Required | Description |
9
9
  | ---- | :--: | :------: | :----------: |
10
- | `accessToken` | `String` | `Yes` | required acessToken to pull mapbox tiles, can be `null` if other tiles are used |
10
+ | `accessToken` | `String` | `Yes` | access token to pull Mapbox-hosted tiles; can be `null` for other tile hosts |
11
11
 
12
12
  ##### Description
13
13
  sets the accessToken, which is required when you want to use mapbox tiles
@@ -18,7 +18,7 @@ not required when using other tiles
18
18
  ##### arguments
19
19
  | Name | Type | Required | Description |
20
20
  | ---- | :--: | :------: | :----------: |
21
- | `accessToken` | `String` | `Yes` | required acessToken to pull mapbox tiles, can be `null` if other tiles are used |
21
+ | `accessToken` | `String` | `Yes` | access token to pull Mapbox-hosted tiles; can be `null` if for other tile hosts |
22
22
 
23
23
  ##### Description
24
24
  gets the accessToken
@@ -59,7 +59,7 @@ Either permission was granted or denied.
59
59
  ##### arguments
60
60
  | Name | Type | Required | Description |
61
61
  | ---- | :--: | :------: | :----------: |
62
- | `connected` | `Boolean` | `Yes` | whether or not mapbox is told to be connected or not |
62
+ | `connected` | `Boolean` | `Yes` | whether or not the SDK should assume it is online |
63
63
 
64
64
  #### Description
65
- If you want to fully block online map - maybe to force offline maps
65
+ If you want to fully block map tile requests over the network, such as for a low-data / offline application.