@maplibre/maplibre-react-native 10.0.0-alpha.23 → 10.0.0-alpha.25

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 (69) hide show
  1. package/.husky/pre-commit +1 -1
  2. package/CHANGELOG.md +10 -0
  3. package/CONTRIBUTING.md +1 -1
  4. package/android/rctmln/build.gradle +5 -0
  5. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java +9 -1
  6. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java +1 -1
  7. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java +1 -1
  8. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java +1 -1
  9. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java +1 -1
  10. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +1 -1
  11. package/docs/Annotation.md +2 -11
  12. package/docs/BackgroundLayer.md +2 -1
  13. package/docs/Callout.md +2 -1
  14. package/docs/Camera.md +28 -29
  15. package/docs/CircleLayer.md +2 -1
  16. package/docs/FillExtrusionLayer.md +2 -1
  17. package/docs/FillLayer.md +2 -1
  18. package/docs/HeadingIndicator.md +2 -1
  19. package/docs/HeatmapLayer.md +2 -1
  20. package/docs/ImageSource.md +2 -1
  21. package/docs/Images.md +2 -1
  22. package/docs/Light.md +2 -1
  23. package/docs/LineLayer.md +2 -1
  24. package/docs/MapView.md +7 -12
  25. package/docs/MarkerView.md +2 -1
  26. package/docs/NativeUserLocation.md +2 -1
  27. package/docs/PointAnnotation.md +2 -1
  28. package/docs/RasterLayer.md +2 -1
  29. package/docs/RasterSource.md +2 -1
  30. package/docs/ShapeSource.md +3 -5
  31. package/docs/Style.md +2 -1
  32. package/docs/SymbolLayer.md +2 -1
  33. package/docs/UserLocation.md +2 -1
  34. package/docs/VectorSource.md +3 -2
  35. package/docs/coordinates.md +2 -1
  36. package/docs/docs.json +49 -88
  37. package/docs/location.md +2 -1
  38. package/docs/offlineManager.md +3 -2
  39. package/docs/snapshotManager.md +2 -1
  40. package/ios/RCTMLN/RCTMLNCamera.h +0 -3
  41. package/ios/RCTMLN/RCTMLNCamera.m +1 -1
  42. package/ios/RCTMLN/RCTMLNCameraManager.m +0 -3
  43. package/javascript/MLNModule.ts +10 -1
  44. package/javascript/Maplibre.ts +1 -1
  45. package/javascript/components/{annotations/Annotation.tsx → Annotation.tsx} +5 -5
  46. package/javascript/components/Camera.tsx +257 -388
  47. package/javascript/components/UserLocation.tsx +1 -1
  48. package/javascript/hooks/useNativeRef.ts +2 -1
  49. package/javascript/types/CameraMode.ts +6 -0
  50. package/package.json +8 -9
  51. package/scripts/codegen.ts +341 -0
  52. package/scripts/templates/MaplibreStyles.ts.ejs +8 -7
  53. package/scripts/templates/RCTMLNStyle.h.ejs +4 -3
  54. package/scripts/templates/RCTMLNStyle.m.ejs +11 -10
  55. package/scripts/templates/RCTMLNStyleFactory.java.ejs +12 -11
  56. package/scripts/templates/component.md.ejs +14 -12
  57. package/scripts/templates/index.d.ts.ejs +2 -1
  58. package/scripts/templates/styleMap.ts.ejs +2 -1
  59. package/scripts/utils/{DocJSONBuilder.js → DocJSONBuilder.ts} +133 -128
  60. package/scripts/utils/{JSDocNodeTree.js → JSDocNodeTree.ts} +14 -13
  61. package/scripts/utils/MarkdownBuilder.ts +44 -0
  62. package/scripts/utils/{template-globals.js → TemplateHelpers.ts} +66 -95
  63. package/scripts/utils/getNativeVersion.ts +53 -0
  64. package/tsconfig.json +2 -3
  65. package/docs/OfflineManager.md +0 -246
  66. package/scripts/download-style-spec.sh +0 -15
  67. package/scripts/generate-docs.js +0 -396
  68. package/scripts/utils/MarkdownBuilder.js +0 -37
  69. package/style-spec/v8.json +0 -6645
package/.husky/pre-commit CHANGED
@@ -2,4 +2,4 @@
2
2
  . "$(dirname -- "$0")/_/husky.sh"
3
3
 
4
4
  yarn lint-staged
5
- yarn generate
5
+ yarn codegen
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ PR Title ([#123](link to my pr))
6
6
 
7
7
  ```
8
8
 
9
+ ## 10.0.0-alpha.25
10
+
11
+ feat: make Camera pure ([#471](https://github.com/maplibre/maplibre-react-native/pull/471))
12
+
13
+ docs: update scripts to TypeScript ([#484](https://github.com/maplibre/maplibre-react-native/pull/484))
14
+
15
+ ## 10.0.0-alpha.24
16
+
17
+ feat: support new arch through interop layer ([#483](https://github.com/maplibre/maplibre-react-native/pull/483))
18
+
9
19
  ## 10.0.0-alpha.23
10
20
 
11
21
  fix: keep @ts-ignore for headingIcon in library ([#477](https://github.com/maplibre/maplibre-react-native/pull/477))
package/CONTRIBUTING.md CHANGED
@@ -55,7 +55,7 @@ can mitigate some of the pain with this.
55
55
 
56
56
  Documentation is generated from code blocks and comments. It will be auto-generated when you commit changes. If any
57
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`.
58
+ commit again. To manually generate the changes, run `yarn codegen`.
59
59
 
60
60
  Notice, that changing the documentation in the individual <COMPONENT>.md within `/docs` will not suffice. The correct
61
61
  way is the above described
@@ -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
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from Annotation.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/Annotation.tsx -->
2
3
  ## <MapLibreGL.Annotation />
3
4
  ###
4
5
 
@@ -25,14 +26,4 @@
25
26
  | `event` | `OnPressEvent` | `Yes` | undefined |
26
27
 
27
28
 
28
- #### symbolStyle()
29
-
30
-
31
-
32
- ##### arguments
33
- | Name | Type | Required | Description |
34
- | ---- | :--: | :------: | :----------: |
35
-
36
-
37
-
38
29
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from BackgroundLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/BackgroundLayer.tsx -->
2
3
  ## <MapLibreGL.BackgroundLayer />
3
4
  ###
4
5
 
package/docs/Callout.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from Callout.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/Callout.tsx -->
2
3
  ## <MapLibreGL.Callout />
3
4
  ### Callout that displays information about a selected annotation near the annotation.
4
5
 
package/docs/Camera.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from Camera.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/Camera.tsx -->
2
3
  ## <MapLibreGL.Camera />
3
4
  ###
4
5
 
@@ -11,63 +12,61 @@
11
12
  | pitch | `number` | `none` | `false` | The pitch of the map. |
12
13
  | zoomLevel | `number` | `none` | `false` | The zoom level of the map. |
13
14
  | padding | `CameraPadding` | `none` | `false` | The viewport padding in points. |
14
- | animationDuration | `number` | `2000` | `false` | The duration the map takes to animate to a new configuration. |
15
- | animationMode | `"flyTo" \| "easeTo" \| "linearTo" \| "moveTo"` | `"easeTo"` | `false` | The easing or path the camera uses to animate to a new configuration. |
16
- | allowUpdates | `boolean` | `true` | `false` | If false, the camera will not send any props to the native module. Intended to be used to prevent unnecessary tile fetching and improve performance when the map is not visible. Defaults to true. |
15
+ | animationDuration | `number` | `none` | `false` | The duration the map takes to animate to a new configuration. |
16
+ | animationMode | `"flyTo" \| "easeTo" \| "linearTo" \| "moveTo"` | `none` | `false` | The easing or path the camera uses to animate to a new configuration. |
17
17
  | defaultSettings | `CameraStop` | `none` | `false` | Default view settings applied on camera |
18
- | minZoomLevel | `number` | `none` | `false` | The minimun zoom level of the map |
19
- | maxZoomLevel | `number` | `none` | `false` | The maximun zoom level of the map |
18
+ | minZoomLevel | `number` | `none` | `false` | Minimum zoom level of the map |
19
+ | maxZoomLevel | `number` | `none` | `false` | Maximum 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
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` |
26
- | triggerKey | `string \| number` | `none` | `false` | Manually update the camera - helpful for when props did not update, however you still want the camera to move |
27
- | onUserTrackingModeChange | `func` | `none` | `false` | FIX ME NO DESCRIPTION<br/>*signature:*`(event:MaplibreGLEvent) => void` |
26
+ | onUserTrackingModeChange | `func` | `none` | `false` | Triggered when `followUserLocation` or `followUserMode` changes<br/>*signature:*`(event:MaplibreGLEvent) => void` |
28
27
 
29
28
  ### methods
30
- #### fitBounds(northEastCoordinates, southWestCoordinates[, padding][, animationDuration])
29
+ #### fitBounds(ne, sw, [padding], [animationDuration])
31
30
 
32
31
  Map camera transitions to fit provided bounds
33
32
 
34
33
  ##### arguments
35
34
  | Name | Type | Required | Description |
36
35
  | ---- | :--: | :------: | :----------: |
37
- | `northEastCoordinates` | `GeoJSON.Position` | `Yes` | North east coordinate of bound |
38
- | `southWestCoordinates` | `GeoJSON.Position` | `Yes` | South west coordinate of bound |
39
- | `padding` | `Number \| Array` | `No` | Padding for the bounds |
40
- | `animationDuration` | `Number` | `No` | Duration of camera animation |
36
+ | `ne` | `GeoJSON.Position` | `Yes` | North east coordinate of bound |
37
+ | `sw` | `GeoJSON.Position` | `Yes` | South west coordinate of bound |
38
+ | `padding` | `number \| number[]` | `No` | Padding for the bounds |
39
+ | `animationDuration` | `number` | `No` | Duration of camera animation |
41
40
 
42
41
 
43
42
 
44
43
  ```javascript
45
- this.camera.fitBounds([lng, lat], [lng, lat])
46
- this.camera.fitBounds([lng, lat], [lng, lat], 20, 1000) // padding for all sides
47
- this.camera.fitBounds([lng, lat], [lng, lat], [verticalPadding, horizontalPadding], 1000)
48
- this.camera.fitBounds([lng, lat], [lng, lat], [top, right, bottom, left], 1000)
44
+ cameraRef.current?.fitBounds([lng, lat], [lng, lat])
45
+ cameraRef.current?.fitBounds([lng, lat], [lng, lat], 20, 1000) // padding for all sides
46
+ cameraRef.current?.fitBounds([lng, lat], [lng, lat], [verticalPadding, horizontalPadding], 1000)
47
+ cameraRef.current?.fitBounds([lng, lat], [lng, lat], [top, right, bottom, left], 1000)
49
48
  ```
50
49
 
51
50
 
52
- #### flyTo(coordinates[, animationDuration])
51
+ #### flyTo(coordinates, [animationDuration])
53
52
 
54
53
  Map camera will fly to new coordinate
55
54
 
56
55
  ##### arguments
57
56
  | Name | Type | Required | Description |
58
57
  | ---- | :--: | :------: | :----------: |
59
- | `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will jump too |
58
+ | `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will jump to |
60
59
  | `animationDuration` | `Number` | `No` | Duration of camera animation |
61
60
 
62
61
 
63
62
 
64
63
  ```javascript
65
- this.camera.flyTo([lng, lat])
66
- this.camera.flyTo([lng, lat], 12000)
64
+ cameraRef.current?.flyTo([lng, lat])
65
+ cameraRef.current?.flyTo([lng, lat], 12000)
67
66
  ```
68
67
 
69
68
 
70
- #### moveTo(coordinates[, animationDuration])
69
+ #### moveTo(coordinates, [animationDuration])
71
70
 
72
71
  Map camera will move to new coordinate at the same zoom level
73
72
 
@@ -80,12 +79,12 @@ Map camera will move to new coordinate at the same zoom level
80
79
 
81
80
 
82
81
  ```javascript
83
- this.camera.moveTo([lng, lat], 200) // eases camera to new location based on duration
84
- this.camera.moveTo([lng, lat]) // snaps camera to new location without any easing
82
+ cameraRef.current?.moveTo([lng, lat], 200) // eases camera to new location based on duration
83
+ cameraRef.current?.moveTo([lng, lat]) // snaps camera to new location without any easing
85
84
  ```
86
85
 
87
86
 
88
- #### zoomTo(zoomLevel[, animationDuration])
87
+ #### zoomTo(zoomLevel, [animationDuration])
89
88
 
90
89
  Map camera will zoom to specified level
91
90
 
@@ -98,8 +97,8 @@ Map camera will zoom to specified level
98
97
 
99
98
 
100
99
  ```javascript
101
- this.camera.zoomTo(16)
102
- this.camera.zoomTo(16, 100)
100
+ cameraRef.current?.zoomTo(16)
101
+ cameraRef.current?.zoomTo(16, 100)
103
102
  ```
104
103
 
105
104
 
@@ -115,13 +114,13 @@ Map camera will perform updates based on provided config. Advanced use only!
115
114
 
116
115
 
117
116
  ```javascript
118
- this.camera.setCamera({
117
+ cameraRef.current?.setCamera({
119
118
  centerCoordinate: [lng, lat],
120
119
  zoomLevel: 16,
121
120
  animationDuration: 2000,
122
121
  })
123
122
 
124
- this.camera.setCamera({
123
+ cameraRef.current?.setCamera({
125
124
  stops: [
126
125
  { pitch: 45, animationDuration: 200 },
127
126
  { heading: 180, animationDuration: 300 },
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from CircleLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/CircleLayer.tsx -->
2
3
  ## <MapLibreGL.CircleLayer />
3
4
  ### CircleLayer is a style layer that renders one or more filled circles on the map.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from FillExtrusionLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/FillExtrusionLayer.tsx -->
2
3
  ## <MapLibreGL.FillExtrusionLayer />
3
4
  ### FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.
4
5
 
package/docs/FillLayer.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from FillLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/FillLayer.tsx -->
2
3
  ## <MapLibreGL.FillLayer />
3
4
  ### FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from HeadingIndicator.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/HeadingIndicator.tsx -->
2
3
  ## <MapLibreGL.HeadingIndicator />
3
4
  ###
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from HeatmapLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/HeatmapLayer.tsx -->
2
3
  ## <MapLibreGL.HeatmapLayer />
3
4
  ### HeatmapLayer is a style layer that renders one or more filled circles on the map.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from ImageSource.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/ImageSource.tsx -->
2
3
  ## <MapLibreGL.ImageSource />
3
4
  ### 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
5
 
package/docs/Images.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from Images.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/Images.tsx -->
2
3
  ## <MapLibreGL.Images />
3
4
  ### Images defines the images used in Symbol etc layers
4
5
 
package/docs/Light.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from Light.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/Light.tsx -->
2
3
  ## <MapLibreGL.Light />
3
4
  ### Light represents the light source for extruded geometries
4
5
 
package/docs/LineLayer.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from LineLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/LineLayer.tsx -->
2
3
  ## <MapLibreGL.LineLayer />
3
4
  ### LineLayer is a style layer that renders one or more stroked polylines on the map.
4
5
 
package/docs/MapView.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from MapView.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/MapView.tsx -->
2
3
  ## <MapLibreGL.MapView />
3
4
  ### MapView backed by MapLibre Native
4
5
 
@@ -16,16 +17,10 @@
16
17
  | pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map |
17
18
  | rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map |
18
19
  | 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 |
20
+ | 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
21
  | tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor |
24
22
  | 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 |
23
+ | 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
24
  | compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map |
30
25
  | compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
31
26
  | compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
@@ -84,7 +79,7 @@ const visibleBounds = await this._map.getVisibleBounds();
84
79
  ```
85
80
 
86
81
 
87
- #### queryRenderedFeaturesAtPoint(point[, filter][, layerIDs])
82
+ #### queryRenderedFeaturesAtPoint(point, [filter], [layerIDs])
88
83
 
89
84
  Returns an array of rendered map features that intersect with a given point.
90
85
 
@@ -102,7 +97,7 @@ this._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1'
102
97
  ```
103
98
 
104
99
 
105
- #### queryRenderedFeaturesInRect(bbox[, filter][, layerIDs])
100
+ #### queryRenderedFeaturesInRect(bbox, [filter], [layerIDs])
106
101
 
107
102
  Returns an array of rendered map features that intersect with the given rectangle,<br/>restricted to the given style layers and filtered by the given predicate.
108
103
 
@@ -172,7 +167,7 @@ const center = await this._map.getCenter();
172
167
  ```
173
168
 
174
169
 
175
- #### setSourceVisibility(visible, sourceId[, sourceLayerId])
170
+ #### setSourceVisibility(visible, sourceId, [sourceLayerId])
176
171
 
177
172
  Sets the visibility of all the layers referencing the specified `sourceLayerId` and/or `sourceId`
178
173
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from MarkerView.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/MarkerView.tsx -->
2
3
  ## <MapLibreGL.MarkerView />
3
4
  ### MarkerView allows you to place a interactive react native marker to the map.<br/><br/>If you have static view consider using PointAnnotation or SymbolLayer they'll offer much better performance<br/>.<br/>This is based on [MakerView plugin](https://docs.mapbox.com/android/plugins/overview/markerview/) on Android<br/>and PointAnnotation on iOS.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from NativeUserLocation.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/NativeUserLocation.tsx -->
2
3
  ## <MapLibreGL.NativeUserLocation />
3
4
  ###
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from PointAnnotation.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/PointAnnotation.tsx -->
2
3
  ## <MapLibreGL.PointAnnotation />
3
4
  ### PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.<br/><br/>Consider using ShapeSource and SymbolLayer instead, if you have many points and you have static images,<br/>they'll offer much better performance<br/><br/>.<br/>If you need interctive views please use MarkerView,<br/>as with PointAnnotation on Android child views are rendered onto a bitmap for better performance.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from RasterLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/RasterLayer.tsx -->
2
3
  ## <MapLibreGL.RasterLayer />
3
4
  ###
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from RasterSource.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/RasterSource.tsx -->
2
3
  ## <MapLibreGL.RasterSource />
3
4
  ### RasterSource is a map content source that supplies raster image tiles to be shown on the map.<br/>The location of and metadata about the tiles are defined either by an option dictionary<br/>or by an external file that conforms to the TileJSON specification.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from ShapeSource.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/ShapeSource.tsx -->
2
3
  ## <MapLibreGL.ShapeSource />
3
4
  ### ShapeSource is a map content source that supplies vector shapes to be shown on the map.<br/>The shape may be a url or a GeoJSON object
4
5
 
@@ -7,10 +8,7 @@
7
8
  | ---- | :--: | :-----: | :------: | :----------: |
8
9
  | id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
9
10
  | 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. |
11
+ | 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
12
  | cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. |
15
13
  | 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
14
  | 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. |
package/docs/Style.md CHANGED
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from Style.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/Style.tsx -->
2
3
  ## <MapLibreGL.Style />
3
4
  ### Style is a component that automatically adds sources / layers to the map using MapLibre Style Spec.<br/>Only [`sources`](https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/) & [`layers`](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) are supported.<br/>Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/maplibre/maplibre-react-native/tree/main/docs.<br/><br/>TODO: Maintainer forking this project does not understand the above comment regarding what is supported.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from SymbolLayer.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/SymbolLayer.tsx -->
2
3
  ## <MapLibreGL.SymbolLayer />
3
4
  ### SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from UserLocation.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/UserLocation.tsx -->
2
3
  ## <MapLibreGL.UserLocation />
3
4
  ###
4
5
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from VectorSource.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/components/VectorSource.tsx -->
2
3
  ## <MapLibreGL.VectorSource />
3
4
  ### VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map.<br/>The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification.
4
5
 
@@ -19,7 +20,7 @@
19
20
  | children | `React.ReactElement \| React.ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
20
21
 
21
22
  ### methods
22
- #### features([layerIDs][, filter])
23
+ #### features([layerIDs], [filter])
23
24
 
24
25
  Returns all features that match the query parameters regardless of whether or not the feature is<br/>currently rendered on the map. The domain of the query includes all currently-loaded vector tiles<br/>and GeoJSON source tiles. This function does not check tiles outside of the visible viewport.
25
26
 
@@ -1,4 +1,5 @@
1
- <!-- This file was autogenerated from coordinates.js do not modify -->
1
+ <!-- DO NOT MODIFY! -->
2
+ <!-- This file is auto-generated from javascript/modules/location/locationManager.ts -->
2
3
  ## <MapLibreGL.coordinates />
3
4
  ### Coorinates sent by locationManager
4
5