@maplibre/maplibre-react-native 9.1.0 → 10.0.0-alpha.2

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 (141) hide show
  1. package/.eslintrc.js +10 -2
  2. package/.husky/pre-commit +5 -0
  3. package/.yarn/plugins/@yarnpkg/plugin-typescript.cjs +9 -0
  4. package/.yarn/sdks/eslint/bin/eslint.js +20 -0
  5. package/.yarn/sdks/eslint/lib/api.js +20 -0
  6. package/.yarn/sdks/eslint/package.json +6 -0
  7. package/.yarn/sdks/integrations.yml +5 -0
  8. package/.yarn/sdks/prettier/index.js +20 -0
  9. package/.yarn/sdks/prettier/package.json +6 -0
  10. package/.yarn/sdks/typescript/bin/tsc +20 -0
  11. package/.yarn/sdks/typescript/bin/tsserver +20 -0
  12. package/.yarn/sdks/typescript/lib/tsc.js +20 -0
  13. package/.yarn/sdks/typescript/lib/tsserver.js +225 -0
  14. package/.yarn/sdks/typescript/lib/tsserverlibrary.js +225 -0
  15. package/.yarn/sdks/typescript/lib/typescript.js +20 -0
  16. package/.yarn/sdks/typescript/package.json +6 -0
  17. package/CHANGELOG.md +18 -0
  18. package/android/rctmgl/build.gradle +7 -7
  19. package/android/rctmgl/src/main/java/com/mapbox/rctmgl/location/LocationManager.java +2 -2
  20. package/android/rctmgl/src/main/java/com/mapbox/rctmgl/modules/RCTMGLOfflineModule.java +21 -26
  21. package/docs/Annotation.md +8 -9
  22. package/docs/BackgroundLayer.md +2 -10
  23. package/docs/Callout.md +5 -5
  24. package/docs/Camera.md +18 -47
  25. package/docs/CircleLayer.md +2 -10
  26. package/docs/FillExtrusionLayer.md +2 -10
  27. package/docs/FillLayer.md +2 -10
  28. package/docs/HeatmapLayer.md +2 -10
  29. package/docs/ImageSource.md +3 -2
  30. package/docs/Images.md +5 -3
  31. package/docs/Light.md +1 -1
  32. package/docs/LineLayer.md +2 -10
  33. package/docs/MapView.md +53 -37
  34. package/docs/MarkerView.md +4 -2
  35. package/docs/NativeUserLocation.md +2 -2
  36. package/docs/PointAnnotation.md +5 -8
  37. package/docs/RasterLayer.md +2 -10
  38. package/docs/RasterSource.md +3 -2
  39. package/docs/ShapeSource.md +12 -7
  40. package/docs/Style.md +1 -1
  41. package/docs/SymbolLayer.md +3 -10
  42. package/docs/UserLocation.md +8 -10
  43. package/docs/VectorSource.md +6 -5
  44. package/docs/coordinates.md +6 -0
  45. package/docs/docs.json +518 -1272
  46. package/docs/location.md +6 -0
  47. package/docs/snapshotManager.md +3 -3
  48. package/javascript/@types/assets.d.ts +4 -0
  49. package/javascript/MGLModule.ts +37 -0
  50. package/javascript/Maplibre.ts +65 -0
  51. package/javascript/components/AbstractLayer.tsx +107 -0
  52. package/javascript/components/AbstractSource.tsx +27 -0
  53. package/javascript/components/BackgroundLayer.tsx +43 -0
  54. package/javascript/components/{Callout.js → Callout.tsx} +67 -65
  55. package/javascript/components/{Camera.js → Camera.tsx} +266 -251
  56. package/javascript/components/CircleLayer.tsx +46 -0
  57. package/javascript/components/FillExtrusionLayer.tsx +47 -0
  58. package/javascript/components/FillLayer.tsx +41 -0
  59. package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +8 -8
  60. package/javascript/components/HeatmapLayer.tsx +44 -0
  61. package/javascript/components/ImageSource.tsx +78 -0
  62. package/javascript/components/Images.tsx +134 -0
  63. package/javascript/components/Light.tsx +67 -0
  64. package/javascript/components/LineLayer.tsx +42 -0
  65. package/javascript/components/{MapView.js → MapView.tsx} +365 -354
  66. package/javascript/components/MarkerView.tsx +104 -0
  67. package/javascript/components/{NativeBridgeComponent.js → NativeBridgeComponent.tsx} +44 -13
  68. package/javascript/components/NativeUserLocation.tsx +33 -0
  69. package/javascript/components/PointAnnotation.tsx +221 -0
  70. package/javascript/components/RasterLayer.tsx +41 -0
  71. package/javascript/components/RasterSource.tsx +117 -0
  72. package/javascript/components/ShapeSource.tsx +383 -0
  73. package/javascript/components/{Style.js → Style.tsx} +129 -38
  74. package/javascript/components/SymbolLayer.tsx +72 -0
  75. package/javascript/components/{UserLocation.js → UserLocation.tsx} +111 -110
  76. package/javascript/components/VectorSource.tsx +207 -0
  77. package/javascript/components/annotations/Annotation.tsx +134 -0
  78. package/javascript/index.ts +4 -0
  79. package/javascript/modules/location/{locationManager.js → locationManager.ts} +71 -10
  80. package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +20 -4
  81. package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +23 -7
  82. package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -24
  83. package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +43 -6
  84. package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +5 -5
  85. package/javascript/requestAndroidLocationPermissions.ts +29 -0
  86. package/javascript/types/BaseProps.ts +5 -0
  87. package/javascript/types/OnPressEvent.ts +13 -0
  88. package/javascript/types/index.ts +7 -0
  89. package/javascript/utils/BridgeValue.ts +90 -0
  90. package/javascript/utils/{Logger.js → Logger.ts} +37 -18
  91. package/javascript/utils/MaplibreStyles.d.ts +1486 -0
  92. package/javascript/utils/StyleValue.ts +49 -0
  93. package/javascript/utils/animated/AbstractAnimatedCoordinates.ts +134 -0
  94. package/javascript/utils/animated/AnimatedCoordinatesArray.ts +112 -0
  95. package/javascript/utils/animated/{AnimatedExtractCoordinateFromArray.js → AnimatedExtractCoordinateFromArray.ts} +5 -5
  96. package/javascript/utils/animated/{AnimatedPoint.js → AnimatedPoint.ts} +20 -12
  97. package/javascript/utils/animated/{AnimatedRouteCoordinatesArray.js → AnimatedRouteCoordinatesArray.ts} +39 -14
  98. package/javascript/utils/animated/{AnimatedShape.js → AnimatedShape.ts} +31 -10
  99. package/javascript/utils/{deprecation.js → deprecation.ts} +9 -6
  100. package/javascript/utils/filterUtils.ts +9 -0
  101. package/javascript/utils/geoUtils.ts +79 -0
  102. package/javascript/utils/{index.js → index.ts} +44 -24
  103. package/javascript/utils/styleMap.ts +264 -0
  104. package/package.json +35 -27
  105. package/plugin/build/withMapLibre.js +18 -3
  106. package/scripts/autogenHelpers/globals.js +1 -1
  107. package/scripts/autogenerate.js +14 -6
  108. package/scripts/download-style-spec.sh +1 -1
  109. package/scripts/templates/MaplibreStyles.ts.ejs +99 -0
  110. package/scripts/templates/index.d.ts.ejs +71 -42
  111. package/scripts/templates/{styleMap.js.ejs → styleMap.ts.ejs} +3 -33
  112. package/setup-jest.js +1 -10
  113. package/tsconfig.json +20 -61
  114. package/index.d.ts +0 -955
  115. package/javascript/components/AbstractLayer.js +0 -75
  116. package/javascript/components/AbstractSource.js +0 -15
  117. package/javascript/components/BackgroundLayer.js +0 -97
  118. package/javascript/components/CircleLayer.js +0 -101
  119. package/javascript/components/FillExtrusionLayer.js +0 -98
  120. package/javascript/components/FillLayer.js +0 -94
  121. package/javascript/components/HeatmapLayer.js +0 -99
  122. package/javascript/components/ImageSource.js +0 -82
  123. package/javascript/components/Images.js +0 -119
  124. package/javascript/components/Light.js +0 -47
  125. package/javascript/components/LineLayer.js +0 -94
  126. package/javascript/components/MarkerView.js +0 -87
  127. package/javascript/components/NativeUserLocation.js +0 -41
  128. package/javascript/components/PointAnnotation.js +0 -216
  129. package/javascript/components/RasterLayer.js +0 -95
  130. package/javascript/components/RasterSource.js +0 -124
  131. package/javascript/components/ShapeSource.js +0 -372
  132. package/javascript/components/SymbolLayer.js +0 -120
  133. package/javascript/components/VectorSource.js +0 -200
  134. package/javascript/components/annotations/Annotation.js +0 -122
  135. package/javascript/index.js +0 -149
  136. package/javascript/utils/BridgeValue.js +0 -81
  137. package/javascript/utils/animated/AnimatedCoordinatesArray.js +0 -191
  138. package/javascript/utils/filterUtils.js +0 -7
  139. package/javascript/utils/geoUtils.js +0 -73
  140. package/javascript/utils/styleMap.js +0 -1932
  141. /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
package/docs/Camera.md CHANGED
@@ -5,55 +5,26 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | allowUpdates | `bool` | `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. |
9
- | animationDuration | `number` | `2000` | `false` | The duration a camera update takes (in ms) |
10
- | animationMode | `enum` | `'easeTo'` | `false` | The animationstyle when the camara updates. One of: `flyTo`, `easeTo`, `linearTo`, `moveTo` |
11
- | defaultSettings | `shape` | `none` | `false` | Default view settings applied on camera |
12
- |   centerCoordinate | `array` | `none` | `false` | Center coordinate on map [lng, lat] |
13
- |   padding | `shape` | `none` | `false` | Padding around edges of map in points |
14
- |     paddingLeft | `number` | `none` | `false` | Left padding in points |
15
- |     paddingRight | `number` | `none` | `false` | Right padding in points |
16
- |     paddingTop | `number` | `none` | `false` | Top padding in points |
17
- |     paddingBottom | `number` | `none` | `false` | Bottom padding in points |
18
- |   heading | `number` | `none` | `false` | Heading on map |
19
- |   pitch | `number` | `none` | `false` | Pitch on map |
20
- | &nbsp;&nbsp;bounds | `shape` | `none` | `false` | Represents a rectangle in geographical coordinates marking the visible area of the map.<br/>The `bounds.padding*` properties are deprecated; use root `padding` property instead. |
21
- | &nbsp;&nbsp;&nbsp;&nbsp;ne | `array` | `none` | `true` | North east coordinate of bound |
22
- | &nbsp;&nbsp;&nbsp;&nbsp;sw | `array` | `none` | `true` | South west coordinate of bound |
23
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingLeft | `number` | `none` | `false` | Left padding in points (deprecated; use root `padding` property instead) |
24
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingRight | `number` | `none` | `false` | Right padding in points (deprecated; use root `padding` property instead) |
25
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingTop | `number` | `none` | `false` | Top padding in points (deprecated; use root `padding` property instead) |
26
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingBottom | `number` | `none` | `false` | Bottom padding in points (deprecated; use root `padding` property instead) |
27
- | &nbsp;&nbsp;onUserTrackingModeChange | `func` | `none` | `false` | Callback that is triggered on user tracking mode changes |
28
- | &nbsp;&nbsp;zoomLevel | `number` | `none` | `false` | Zoom level of the map |
29
- | centerCoordinate | `array` | `none` | `false` | Center coordinate on map [lng, lat] |
30
- | padding | `shape` | `none` | `false` | Padding around edges of map in points |
31
- | &nbsp;&nbsp;paddingLeft | `number` | `none` | `false` | Left padding in points |
32
- | &nbsp;&nbsp;paddingRight | `number` | `none` | `false` | Right padding in points |
33
- | &nbsp;&nbsp;paddingTop | `number` | `none` | `false` | Top padding in points |
34
- | &nbsp;&nbsp;paddingBottom | `number` | `none` | `false` | Bottom padding in points |
35
- | heading | `number` | `none` | `false` | Heading on map |
36
- | pitch | `number` | `none` | `false` | Pitch on map |
37
- | bounds | `shape` | `none` | `false` | Represents a rectangle in geographical coordinates marking the visible area of the map.<br/>The `bounds.padding*` properties are deprecated; use root `padding` property instead. |
38
- | &nbsp;&nbsp;ne | `array` | `none` | `true` | North east coordinate of bound |
39
- | &nbsp;&nbsp;sw | `array` | `none` | `true` | South west coordinate of bound |
40
- | &nbsp;&nbsp;paddingLeft | `number` | `none` | `false` | Left padding in points (deprecated; use root `padding` property instead) |
41
- | &nbsp;&nbsp;paddingRight | `number` | `none` | `false` | Right padding in points (deprecated; use root `padding` property instead) |
42
- | &nbsp;&nbsp;paddingTop | `number` | `none` | `false` | Top padding in points (deprecated; use root `padding` property instead) |
43
- | &nbsp;&nbsp;paddingBottom | `number` | `none` | `false` | Bottom padding in points (deprecated; use root `padding` property instead) |
44
- | onUserTrackingModeChange | `func` | `none` | `false` | Callback that is triggered on user tracking mode changes |
45
- | zoomLevel | `number` | `none` | `false` | Zoom level of the map |
8
+ | centerCoordinate | `GeoJSON.Position` | `none` | `false` | The location on which the map should center. |
9
+ | bounds | `CameraBoundsWithPadding` | `none` | `false` | The corners of a box around which the map should bound. Contains padding props for backwards<br/>compatibility; the root `padding` prop should be used instead. |
10
+ | heading | `number` | `none` | `false` | The heading (orientation) of the map. |
11
+ | pitch | `number` | `none` | `false` | The pitch of the map. |
12
+ | zoomLevel | `number` | `none` | `false` | The zoom level of the map. |
13
+ | 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. |
17
+ | defaultSettings | `CameraStop` | `none` | `false` | Default view settings applied on camera |
46
18
  | minZoomLevel | `number` | `none` | `false` | The minimun zoom level of the map |
47
19
  | maxZoomLevel | `number` | `none` | `false` | The maximun zoom level of the map |
48
- | maxBounds | `shape` | `none` | `false` | Restrict map panning so that the center is within these bounds |
49
- | &nbsp;&nbsp;ne | `array` | `none` | `true` | northEastCoordinates - North east coordinate of bound |
50
- | &nbsp;&nbsp;sw | `array` | `none` | `true` | southWestCoordinates - South west coordinate of bound |
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 `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) |
20
+ | maxBounds | `CameraBounds` | `none` | `false` | Restrict map panning so that the center is within these bounds |
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) |
53
23
  | followZoomLevel | `number` | `none` | `false` | The zoomLevel on map while followUserLocation is set to `true` |
54
24
  | followPitch | `number` | `none` | `false` | The pitch on map while followUserLocation is set to `true` |
55
25
  | followHeading | `number` | `none` | `false` | The heading on map while followUserLocation is set to `true` |
56
- | triggerKey | `any` | `none` | `false` | Manually update the camera - helpful for when props did not update, however you still want the camera to move |
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` |
57
28
 
58
29
  ### methods
59
30
  #### fitBounds(northEastCoordinates, southWestCoordinates[, padding][, animationDuration])
@@ -85,7 +56,7 @@ Map camera will fly to new coordinate
85
56
  ##### arguments
86
57
  | Name | Type | Required | Description |
87
58
  | ---- | :--: | :------: | :----------: |
88
- | `coordinates` | `Array` | `Yes` | Coordinates that map camera will jump too |
59
+ | `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will jump too |
89
60
  | `animationDuration` | `Number` | `No` | Duration of camera animation |
90
61
 
91
62
 
@@ -103,7 +74,7 @@ Map camera will move to new coordinate at the same zoom level
103
74
  ##### arguments
104
75
  | Name | Type | Required | Description |
105
76
  | ---- | :--: | :------: | :----------: |
106
- | `coordinates` | `Array` | `Yes` | Coordinates that map camera will move too |
77
+ | `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will move too |
107
78
  | `animationDuration` | `Number` | `No` | Duration of camera animation |
108
79
 
109
80
 
@@ -121,7 +92,7 @@ Map camera will zoom to specified level
121
92
  ##### arguments
122
93
  | Name | Type | Required | Description |
123
94
  | ---- | :--: | :------: | :----------: |
124
- | `zoomLevel` | `Number` | `Yes` | Zoom level that the map camera will animate too |
95
+ | `zoomLevel` | `number` | `Yes` | Zoom level that the map camera will animate too |
125
96
  | `animationDuration` | `Number` | `No` | Duration of camera animation |
126
97
 
127
98
 
@@ -5,16 +5,8 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
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
- | 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
- | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
- | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
- | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
- | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
- | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
8
+ | style | `CircleLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
+ | sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
18
10
 
19
11
 
20
12
  ### styles
@@ -5,16 +5,8 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
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
- | 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
- | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
- | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
- | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
- | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
- | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
8
+ | style | `FillExtrusionLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
+ | sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
18
10
 
19
11
 
20
12
  ### styles
package/docs/FillLayer.md CHANGED
@@ -5,16 +5,8 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
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
- | 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
- | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
- | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
- | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
- | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
- | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
8
+ | style | `FillLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
+ | sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
18
10
 
19
11
 
20
12
  ### styles
@@ -5,16 +5,8 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
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
- | 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
- | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
- | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
- | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
- | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
- | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
8
+ | style | `HeatmapLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
+ | sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
18
10
 
19
11
 
20
12
  ### styles
@@ -6,7 +6,8 @@
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the source. |
9
- | url | `union` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL to the source image.<br/>Gifs are currently not supported. |
10
- | coordinates | `array` | `none` | `true` | The top left, top right, bottom right, and bottom left coordinates for the image. |
9
+ | url | `number \| string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL to the source image.<br/>Gifs are currently not supported. |
10
+ | coordinates | `tuple` | `none` | `false` | The top left, top right, bottom right, and bottom left coordinates for the image. |
11
+ | children | `ReactElement \| ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
11
12
 
12
13
 
package/docs/Images.md CHANGED
@@ -5,8 +5,10 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | images | `object` | `none` | `false` | Specifies the external images in key-value pairs required for the shape source.<br/>Keys are names - see iconImage expressions, values can be either urls-s objects<br/>with format {uri: 'http://...'}` or `require('image.png')` or `import 'image.png'` |
9
- | nativeAssetImages | `array` | `none` | `false` | If you have an asset under Image.xcassets on iOS and the drawables directory on android<br/>you can specify an array of string names with assets as the key `['pin']`. |
10
- | onImageMissing | `func` | `none` | `false` | Gets called when a Layer is trying to render an image whose key is not present in<br/>any of the `Images` component of the Map. |
8
+ | images | `shape` | `none` | `false` | Specifies the external images in key-value pairs required for the shape source.<br/>Keys are names - see iconImage expressions, values can be either urls-s objects<br/>with format {uri: 'http://...'}` or `require('image.png')` or `import 'image.png'` |
9
+ | &nbsp;&nbsp;[object Object] | `union` | `none` | `true` | FIX ME NO DESCRIPTION |
10
+ | nativeAssetImages | `Array` | `none` | `false` | If you have an asset under Image.xcassets on iOS and the drawables directory on android<br/>you can specify an array of string names with assets as the key `['pin']`. |
11
+ | id | `string` | `none` | `false` | FIX ME NO DESCRIPTION |
12
+ | children | `ReactElement` | `none` | `true` | FIX ME NO DESCRIPTION |
11
13
 
12
14
 
package/docs/Light.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | style | `custom` | `none` | `false` | Customizable style attributes |
8
+ | style | `LightLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
9
 
10
10
 
11
11
  ### styles
package/docs/LineLayer.md CHANGED
@@ -5,16 +5,8 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
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
- | 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
- | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
- | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
- | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
- | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
- | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
8
+ | style | `LineLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
+ | sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
18
10
 
19
11
 
20
12
  ### styles
package/docs/MapView.md CHANGED
@@ -5,43 +5,59 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | contentInset | `union` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
9
- | style | `any` | `none` | `false` | Style for wrapping React Native View |
10
- | styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapLibreGL.StyleURL.Street` |
8
+ | contentInset | `number[] \| number` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
9
+ | style | `ViewProps['style']` | `none` | `false` | Style for wrapping React Native View |
10
+ | styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapLibreGL.StyleURL.Default` |
11
11
  | styleJSON | `string` | `none` | `false` | StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec |
12
12
  | preferredFramesPerSecond | `number` | `none` | `false` | iOS: The preferred frame rate at which the map view is rendered.<br/>The default value for this property is MGLMapViewPreferredFramesPerSecondDefault,<br/>which will adaptively set the preferred frame rate based on the capability of<br/>the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.<br/><br/>Android: The maximum frame rate at which the map view is rendered, but it can't excess the ability of device hardware.<br/>This property can be set to arbitrary integer values. |
13
- | localizeLabels | `bool` | `false` | `false` | Automatically change the language of the map labels to the system’s preferred language,<br/>this is not something that can be toggled on/off |
14
- | zoomEnabled | `bool` | `none` | `false` | Enable/Disable zoom on the map |
15
- | scrollEnabled | `bool` | `true` | `false` | Enable/Disable scroll on the map |
16
- | pitchEnabled | `bool` | `true` | `false` | Enable/Disable pitch on map |
17
- | rotateEnabled | `bool` | `true` | `false` | Enable/Disable rotation on map |
18
- | attributionEnabled | `bool` | `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 | `union` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
20
- | tintColor | `union` | `none` | `false` | MapView's tintColor |
21
- | logoEnabled | `bool` | `false` | `false` | Enable/Disable the logo on the map. |
22
- | logoPosition | `union` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
23
- | compassEnabled | `bool` | `none` | `false` | Enable/Disable the compass from appearing on the map |
13
+ | localizeLabels | `boolean` | `false` | `false` | Automatically change the language of the map labels to the system’s preferred language,<br/>this is not something that can be toggled on/off |
14
+ | zoomEnabled | `boolean` | `none` | `false` | Enable/Disable zoom on the map |
15
+ | scrollEnabled | `boolean` | `true` | `false` | Enable/Disable scroll on the map |
16
+ | pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map |
17
+ | rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map |
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 | `\| {
20
+ top?: number;
21
+ left?: number;
22
+ }
23
+ \| {
24
+ top?: number;
25
+ right?: number;
26
+ }
27
+ \| {
28
+ bottom?: number;
29
+ left?: number;
30
+ }
31
+ \| {
32
+ bottom?: number;
33
+ right?: number;
34
+ }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
35
+ | tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor |
36
+ | logoEnabled | `boolean` | `false` | `false` | Enable/Disable the logo on the map. |
37
+ | logoPosition | `\| {
38
+ top?: number;
39
+ left?: number;
40
+ }
41
+ \| {
42
+ top?: number;
43
+ right?: number;
44
+ }
45
+ \| {
46
+ bottom?: number;
47
+ left?: number;
48
+ }
49
+ \| {
50
+ bottom?: number;
51
+ right?: number;
52
+ }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
53
+ | compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map |
24
54
  | compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
25
55
  | compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
26
- | surfaceView | `bool` | `false` | `false` | [Android only] Enable/Disable use of GLSurfaceView insted of TextureView. |
27
- | onPress | `func` | `none` | `false` | Map press listener, gets called when a user presses the map |
28
- | onLongPress | `func` | `none` | `false` | Map long press listener, gets called when a user long presses the map |
29
- | onRegionWillChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is about to change. |
30
- | onRegionIsChanging | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is changing. |
31
- | onRegionDidChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region finished changing |
32
- | onWillStartLoadingMap | `func` | `none` | `false` | This event is triggered when the map is about to start loading a new map style. |
33
- | onDidFinishLoadingMap | `func` | `none` | `false` | This is triggered when the map has successfully loaded a new map style. |
34
- | onDidFailLoadingMap | `func` | `none` | `false` | This event is triggered when the map has failed to load a new map style. |
35
- | onWillStartRenderingFrame | `func` | `none` | `false` | This event is triggered when the map will start rendering a frame. |
36
- | onDidFinishRenderingFrame | `func` | `none` | `false` | This event is triggered when the map finished rendering a frame. |
37
- | onDidFinishRenderingFrameFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering a frame. |
38
- | onWillStartRenderingMap | `func` | `none` | `false` | This event is triggered when the map will start rendering the map. |
39
- | onDidFinishRenderingMap | `func` | `none` | `false` | This event is triggered when the map finished rendering the map. |
40
- | onDidFinishRenderingMapFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering the map. |
41
- | onUserLocationUpdate | `func` | `none` | `false` | This event is triggered when the user location is updated. |
42
- | onDidFinishLoadingStyle | `func` | `none` | `false` | This event is triggered when a style has finished loading. |
56
+ | surfaceView | `boolean` | `false` | `false` | [Android only] Enable/Disable use of GLSurfaceView insted of TextureView. |
57
+ | onUserLocationUpdate | `func` | `none` | `false` | This event is triggered when the user location is updated.<br/>*signature:*`(location:Location) => void` |
43
58
  | regionWillChangeDebounceTime | `number` | `10` | `false` | The emitted frequency of regionwillchange events |
44
59
  | regionDidChangeDebounceTime | `number` | `500` | `false` | The emitted frequency of regiondidchange events |
60
+ | children | `ReactNode` | `none` | `true` | FIX ME NO DESCRIPTION |
45
61
 
46
62
  ### methods
47
63
  #### getPointInView(coordinate)
@@ -51,7 +67,7 @@ Converts a geographic coordinate to a point in the given view’s coordinate sys
51
67
  ##### arguments
52
68
  | Name | Type | Required | Description |
53
69
  | ---- | :--: | :------: | :----------: |
54
- | `coordinate` | `Array` | `Yes` | A point expressed in the map view's coordinate system. |
70
+ | `coordinate` | `GeoJSON.Position` | `Yes` | A point expressed in the map view's coordinate system. |
55
71
 
56
72
 
57
73
 
@@ -99,8 +115,8 @@ Returns an array of rendered map features that intersect with a given point.
99
115
  ##### arguments
100
116
  | Name | Type | Required | Description |
101
117
  | ---- | :--: | :------: | :----------: |
102
- | `coordinate` | `Array` | `Yes` | A point expressed in the map view’s coordinate system. |
103
- | `filter` | `Array` | `No` | A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. |
118
+ | `coordinate` | `GeoJSON.Position` | `Yes` | A point expressed in the map view’s coordinate system. |
119
+ | `filter` | `FilterExpression` | `No` | A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. |
104
120
  | `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by |
105
121
 
106
122
 
@@ -117,8 +133,8 @@ Returns an array of rendered map features that intersect with the given rectangl
117
133
  ##### arguments
118
134
  | Name | Type | Required | Description |
119
135
  | ---- | :--: | :------: | :----------: |
120
- | `bbox` | `Array` | `Yes` | A rectangle expressed in the map view’s coordinate system. |
121
- | `filter` | `Array` | `No` | A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. |
136
+ | `bbox` | `GeoJSON.BBox` | `Yes` | A rectangle expressed in the map view’s coordinate system. |
137
+ | `filter` | `FilterExpression` | `No` | A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. |
122
138
  | `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by |
123
139
 
124
140
 
@@ -188,7 +204,7 @@ Sets the visibility of all the layers referencing the specified `sourceLayerId`
188
204
  | Name | Type | Required | Description |
189
205
  | ---- | :--: | :------: | :----------: |
190
206
  | `visible` | `boolean` | `Yes` | Visibility of the layers |
191
- | `sourceId` | `String` | `Yes` | Identifier of the target source (e.g. 'composite') |
207
+ | `sourceId` | `string` | `Yes` | Identifier of the target source (e.g. 'composite') |
192
208
  | `sourceLayerId` | `String` | `No` | Identifier of the target source-layer (e.g. 'building') |
193
209
 
194
210
 
@@ -5,10 +5,12 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | coordinate | `array` | `none` | `true` | The center point (specified as a map coordinate) of the marker.<br/>See also #anchor. |
8
+ | coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the marker.<br/>See also #anchor. |
9
9
  | anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
10
10
  | &nbsp;&nbsp;x | `number` | `none` | `true` | `x` of anchor |
11
11
  | &nbsp;&nbsp;y | `number` | `none` | `true` | `y` of anchor |
12
- | children | `element` | `none` | `true` | Expects one child - can be container with multiple elements |
12
+ | allowOverlap | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION |
13
+ | isSelected | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION |
14
+ | children | `ReactReactElement` | `none` | `true` | Expects one child - can be container with multiple elements |
13
15
 
14
16
 
@@ -5,7 +5,7 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | androidRenderMode | `enum` | `none` | `false` | Android render mode.<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
9
- | iosShowsUserHeadingIndicator | `bool` | `none` | `false` | iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.<br/><br/>@platform ios |
8
+ | androidRenderMode | `'normal' \| 'compass' \| 'gps'` | `none` | `false` | Android render mode.<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
9
+ | iosShowsUserHeadingIndicator | `boolean` | `none` | `false` | iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.<br/><br/>@platform ios |
10
10
 
11
11
 
@@ -8,17 +8,14 @@
8
8
  | id | `string` | `none` | `true` | A string that uniquely identifies the annotation |
9
9
  | title | `string` | `none` | `false` | The string containing the annotation’s title. Note this is required to be set if you want to see a callout appear on iOS. |
10
10
  | snippet | `string` | `none` | `false` | The string containing the annotation’s snippet(subtitle). Not displayed in the default callout. |
11
- | selected | `bool` | `none` | `false` | Manually selects/deselects annotation<br/>@type {[type]} |
12
- | draggable | `bool` | `false` | `false` | Enable or disable dragging. Defaults to false. |
13
- | coordinate | `array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. |
11
+ | selected | `boolean` | `none` | `false` | Manually selects/deselects annotation<br/>@type {[type]} |
12
+ | draggable | `boolean` | `false` | `false` | Enable or disable dragging. Defaults to false. |
13
+ | coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. |
14
14
  | anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
15
15
  | &nbsp;&nbsp;x | `number` | `none` | `true` | See anchor |
16
16
  | &nbsp;&nbsp;y | `number` | `none` | `true` | See anchor |
17
- | onSelected | `func` | `none` | `false` | This callback is fired once this annotation is selected. Returns a Feature as the first param. |
18
- | onDeselected | `func` | `none` | `false` | This callback is fired once this annotation is deselected. |
19
- | onDragStart | `func` | `none` | `false` | This callback is fired once this annotation has started being dragged. |
20
- | onDragEnd | `func` | `none` | `false` | This callback is fired once this annotation has stopped being dragged. |
21
- | onDrag | `func` | `none` | `false` | This callback is fired while this annotation is being dragged. |
17
+ | children | `React.ReactElement \| [React.ReactElement, React.ReactElement]` | `none` | `true` | Expects one child, and an optional callout can be added as well |
18
+ | style | `ViewProps['style']` | `none` | `false` | FIX ME NO DESCRIPTION |
22
19
 
23
20
  ### methods
24
21
  #### refresh()
@@ -5,16 +5,8 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
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
- | 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
- | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
- | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
- | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
- | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
- | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
8
+ | style | `RasterLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
+ | sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
18
10
 
19
11
 
20
12
  ### styles
@@ -7,11 +7,12 @@
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
9
9
  | url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. |
10
- | tileUrlTemplates | `array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.<br/>Example: https://example.com/raster-tiles/{z}/{x}/{y}.png |
10
+ | tileUrlTemplates | `Array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.<br/>Example: https://example.com/raster-tiles/{z}/{x}/{y}.png |
11
11
  | minZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.<br/>The value should be between 0 and 22, inclusive, and less than<br/>maxZoomLevel, if specified. The default value for this option is 0. |
12
12
  | maxZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the maximum zoom level at which to display tiles from the source.<br/>The value should be between 0 and 22, inclusive, and less than<br/>minZoomLevel, if specified. The default value for this option is 22. |
13
13
  | tileSize | `number` | `none` | `false` | Size of the map tiles.<br/>Mapbox urls default to 256, all others default to 512. |
14
- | tms | `bool` | `none` | `false` | Influences the y direction of the tile coordinates. (tms inverts y axis) |
14
+ | tms | `boolean` | `none` | `false` | Influences the y direction of the tile coordinates. (tms inverts y axis) |
15
15
  | attribution | `string` | `none` | `false` | An HTML or literal text string defining the buttons to be displayed in an action sheet when the<br/>source is part of a map view’s style and the map view’s attribution button is pressed. |
16
+ | children | `React.ReactElement \| React.ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
16
17
 
17
18
 
@@ -7,19 +7,24 @@
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 | `object` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
11
- | cluster | `bool` | `none` | `false` | Enables clustering on the source for point shapes. |
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. |
14
+ | cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. |
12
15
  | 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. |
13
16
  | 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. |
14
- | clusterProperties | `object` | `none` | `false` | Specifies custom properties on the generated clusters if clustering<br/>is enabled, aggregating values from clustered points.<br/><br/>Has the form `{ "property_name": [operator, map_expression]}`, where<br/> `operator` is a custom reduce expression that references a special `["accumulated"]` value -<br/> it accumulates the property value from clusters/points the cluster contains<br/> `map_expression` produces the value of a single point<br/><br/>Example: `{ "resultingSum": [["+", ["accumulated"], ["get", "resultingSum"]], ["get", "scalerank"]] }` |
17
+ | clusterProperties | `shape` | `none` | `false` | Specifies custom properties on the generated clusters if clustering<br/>is enabled, aggregating values from clustered points.<br/><br/>Has the form `{ "property_name": [operator, map_expression]}`, where<br/> `operator` is a custom reduce expression that references a special `["accumulated"]` value -<br/> it accumulates the property value from clusters/points the cluster contains<br/> `map_expression` produces the value of a single point<br/><br/>Example: `{ "resultingSum": [["+", ["accumulated"], ["get", "resultingSum"]], ["get", "scalerank"]] }` |
18
+ | &nbsp;&nbsp;[object Object] | `ExpressionField` | `none` | `true` | FIX ME NO DESCRIPTION |
15
19
  | maxZoomLevel | `number` | `none` | `false` | Specifies the maximum zoom level at which to create vector tiles.<br/>A greater value produces greater detail at high zoom levels.<br/>The default value is 18. |
16
20
  | buffer | `number` | `none` | `false` | Specifies the size of the tile buffer on each side.<br/>A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself.<br/>Larger values produce fewer rendering artifacts near tile edges and slower performance.<br/>The default value is 128. |
17
21
  | tolerance | `number` | `none` | `false` | Specifies the Douglas-Peucker simplification tolerance.<br/>A greater value produces simpler geometries and improves performance.<br/>The default value is 0.375. |
18
- | lineMetrics | `bool` | `none` | `false` | Whether to calculate line distance metrics.<br/>This is required for line layers that specify lineGradient values.<br/>The default value is false. |
19
- | onPress | `func` | `none` | `false` | Source press listener, gets called when a user presses one of the children layers only<br/>if that layer has a higher z-index than another source layers |
22
+ | lineMetrics | `boolean` | `none` | `false` | Whether to calculate line distance metrics.<br/>This is required for line layers that specify lineGradient values.<br/>The default value is false. |
23
+ | onPress | `func` | `none` | `false` | Source press listener, gets called when a user presses one of the children layers only<br/>if that layer has a higher z-index than another source layers<br/><br/>@param {Object} event<br/>@param {Object[]} event.features - the geojson features that have hit by the press (might be multiple)<br/>@param {Object} event.coordinates - the coordinates of the click<br/>@param {Object} event.point - the point of the click<br/>@return void<br/>*signature:*`(event:OnPressEvent) => void` |
20
24
  | hitbox | `shape` | `none` | `false` | Overrides the default touch hitbox(44x44 pixels) for the source layers |
21
25
  | &nbsp;&nbsp;width | `number` | `none` | `true` | `width` of hitbox |
22
26
  | &nbsp;&nbsp;height | `number` | `none` | `true` | `height` of hitbox |
27
+ | children | `ReactElement \| ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
23
28
 
24
29
  ### methods
25
30
  #### features([filter])
@@ -29,7 +34,7 @@ Returns all features from the source that match the query parameters regardless
29
34
  ##### arguments
30
35
  | Name | Type | Required | Description |
31
36
  | ---- | :--: | :------: | :----------: |
32
- | `filter` | `Array` | `No` | an optional filter statement to filter the returned Features. |
37
+ | `filter` | `FilterExpression` | `No` | an optional filter statement to filter the returned Features. |
33
38
 
34
39
 
35
40
 
@@ -95,7 +100,7 @@ const collection = await shapeSource.getClusterChildren(clusterId);
95
100
  ##### arguments
96
101
  | Name | Type | Required | Description |
97
102
  | ---- | :--: | :------: | :----------: |
98
- | `event` | `n/a` | `Yes` | undefined |
103
+ | `event` | `NativeSyntheticEvent` | `Yes` | undefined |
99
104
 
100
105
 
101
106
 
package/docs/Style.md CHANGED
@@ -5,6 +5,6 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | json | `any` | `none` | `false` | A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON. |
8
+ | json | `MaplibreJSON \| URL` | `none` | `false` | A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON. |
9
9
 
10
10
 
@@ -5,16 +5,9 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
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
- | 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
- | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
- | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
- | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
- | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
- | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
8
+ | style | `SymbolLayerStyleProps` | `none` | `false` | Customizable style attributes |
9
+ | children | `ReactElement \| ReactElement[]` | `none` | `false` | @deprecated passed children used to create an image with id of symbol in style and also set the iconImageName property accordingly.<br/>This is now deprecated, use Image component instead. |
10
+ | sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
18
11
 
19
12
 
20
13
  ### styles
@@ -5,25 +5,23 @@
5
5
  ### props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
- | animated | `bool` | `true` | `false` | Whether location icon is animated between updates |
9
- | renderMode | `enum` | `'normal'` | `false` | Which render mode to use.<br/>Can either be `normal` or `native` |
10
- | androidRenderMode | `enum` | `none` | `false` | native/android only render mode<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
11
- | visible | `bool` | `true` | `false` | Whether location icon is visible |
12
- | onPress | `func` | `none` | `false` | Callback that is triggered on location icon press |
13
- | onUpdate | `func` | `none` | `false` | Callback that is triggered on location update |
14
- | showsUserHeadingIndicator | `bool` | `false` | `false` | Show or hide small arrow which indicates direction the device is pointing relative to north. |
8
+ | animated | `boolean` | `true` | `false` | Whether location icon is animated between updates |
9
+ | renderMode | `'normal' \| 'native'` | `'normal'` | `false` | Which render mode to use.<br/>Can either be `normal` or `native` |
10
+ | androidRenderMode | `'normal' \| 'compass' \| 'gps'` | `none` | `false` | native/android only render mode<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
11
+ | visible | `boolean` | `true` | `false` | Whether location icon is visible |
12
+ | showsUserHeadingIndicator | `boolean` | `false` | `false` | Show or hide small arrow which indicates direction the device is pointing relative to north. |
15
13
  | minDisplacement | `number` | `0` | `false` | Minimum amount of movement before GPS location is updated in meters |
16
- | children | `any` | `none` | `false` | Custom location icon of type mapbox-gl-native components<br/><br/>NOTE: Forking maintainer does not understand the above comment. |
14
+ | children | `ReactElement \| ReactElement[]` | `none` | `false` | Custom location icon of type mapbox-gl-native components<br/><br/>NOTE: Forking maintainer does not understand the above comment. |
17
15
 
18
16
  ### methods
19
- #### setLocationManager({running})
17
+ #### setLocationManager({running}: {running: boolean})
20
18
 
21
19
  Whether to start or stop listening to the locationManager<br/><br/>Notice, that listening will start automatically when<br/>either `onUpdate` or `visible` are set
22
20
 
23
21
  ##### arguments
24
22
  | Name | Type | Required | Description |
25
23
  | ---- | :--: | :------: | :----------: |
26
- | `{running}` | `n/a` | `Yes` | undefined |
24
+ | `{running}: {running: boolean}` | `{running:boolean}` | `Yes` | undefined |
27
25
 
28
26
 
29
27
  #### needsLocationManagerRunning()