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

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 (137) 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 +11 -0
  18. package/docs/Annotation.md +8 -9
  19. package/docs/BackgroundLayer.md +2 -10
  20. package/docs/Callout.md +5 -5
  21. package/docs/Camera.md +18 -47
  22. package/docs/CircleLayer.md +2 -10
  23. package/docs/FillExtrusionLayer.md +2 -10
  24. package/docs/FillLayer.md +2 -10
  25. package/docs/HeatmapLayer.md +2 -10
  26. package/docs/ImageSource.md +3 -2
  27. package/docs/Images.md +5 -3
  28. package/docs/Light.md +1 -1
  29. package/docs/LineLayer.md +2 -10
  30. package/docs/MapView.md +53 -37
  31. package/docs/MarkerView.md +4 -2
  32. package/docs/NativeUserLocation.md +2 -2
  33. package/docs/PointAnnotation.md +5 -8
  34. package/docs/RasterLayer.md +2 -10
  35. package/docs/RasterSource.md +3 -2
  36. package/docs/ShapeSource.md +12 -7
  37. package/docs/Style.md +1 -1
  38. package/docs/SymbolLayer.md +3 -10
  39. package/docs/UserLocation.md +8 -10
  40. package/docs/VectorSource.md +6 -5
  41. package/docs/coordinates.md +6 -0
  42. package/docs/docs.json +518 -1272
  43. package/docs/location.md +6 -0
  44. package/docs/snapshotManager.md +3 -3
  45. package/javascript/@types/assets.d.ts +4 -0
  46. package/javascript/MGLModule.ts +37 -0
  47. package/javascript/Maplibre.ts +65 -0
  48. package/javascript/components/AbstractLayer.tsx +107 -0
  49. package/javascript/components/AbstractSource.tsx +27 -0
  50. package/javascript/components/BackgroundLayer.tsx +43 -0
  51. package/javascript/components/{Callout.js → Callout.tsx} +67 -65
  52. package/javascript/components/{Camera.js → Camera.tsx} +266 -251
  53. package/javascript/components/CircleLayer.tsx +46 -0
  54. package/javascript/components/FillExtrusionLayer.tsx +47 -0
  55. package/javascript/components/FillLayer.tsx +41 -0
  56. package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +8 -8
  57. package/javascript/components/HeatmapLayer.tsx +44 -0
  58. package/javascript/components/ImageSource.tsx +78 -0
  59. package/javascript/components/Images.tsx +134 -0
  60. package/javascript/components/Light.tsx +67 -0
  61. package/javascript/components/LineLayer.tsx +42 -0
  62. package/javascript/components/{MapView.js → MapView.tsx} +365 -354
  63. package/javascript/components/MarkerView.tsx +104 -0
  64. package/javascript/components/{NativeBridgeComponent.js → NativeBridgeComponent.tsx} +44 -13
  65. package/javascript/components/NativeUserLocation.tsx +33 -0
  66. package/javascript/components/PointAnnotation.tsx +221 -0
  67. package/javascript/components/RasterLayer.tsx +41 -0
  68. package/javascript/components/RasterSource.tsx +117 -0
  69. package/javascript/components/ShapeSource.tsx +383 -0
  70. package/javascript/components/{Style.js → Style.tsx} +129 -38
  71. package/javascript/components/SymbolLayer.tsx +72 -0
  72. package/javascript/components/{UserLocation.js → UserLocation.tsx} +111 -110
  73. package/javascript/components/VectorSource.tsx +207 -0
  74. package/javascript/components/annotations/Annotation.tsx +134 -0
  75. package/javascript/index.ts +4 -0
  76. package/javascript/modules/location/{locationManager.js → locationManager.ts} +71 -10
  77. package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +20 -4
  78. package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +23 -7
  79. package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -24
  80. package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +43 -6
  81. package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +5 -5
  82. package/javascript/requestAndroidLocationPermissions.ts +29 -0
  83. package/javascript/types/BaseProps.ts +5 -0
  84. package/javascript/types/OnPressEvent.ts +13 -0
  85. package/javascript/types/index.ts +7 -0
  86. package/javascript/utils/BridgeValue.ts +90 -0
  87. package/javascript/utils/{Logger.js → Logger.ts} +37 -18
  88. package/javascript/utils/MaplibreStyles.d.ts +1486 -0
  89. package/javascript/utils/StyleValue.ts +49 -0
  90. package/javascript/utils/animated/AbstractAnimatedCoordinates.ts +134 -0
  91. package/javascript/utils/animated/AnimatedCoordinatesArray.ts +112 -0
  92. package/javascript/utils/animated/{AnimatedExtractCoordinateFromArray.js → AnimatedExtractCoordinateFromArray.ts} +5 -5
  93. package/javascript/utils/animated/{AnimatedPoint.js → AnimatedPoint.ts} +20 -12
  94. package/javascript/utils/animated/{AnimatedRouteCoordinatesArray.js → AnimatedRouteCoordinatesArray.ts} +39 -14
  95. package/javascript/utils/animated/{AnimatedShape.js → AnimatedShape.ts} +31 -10
  96. package/javascript/utils/{deprecation.js → deprecation.ts} +9 -6
  97. package/javascript/utils/filterUtils.ts +9 -0
  98. package/javascript/utils/geoUtils.ts +79 -0
  99. package/javascript/utils/{index.js → index.ts} +44 -24
  100. package/javascript/utils/styleMap.ts +264 -0
  101. package/package.json +35 -27
  102. package/plugin/build/withMapLibre.js +3 -2
  103. package/scripts/autogenHelpers/globals.js +1 -1
  104. package/scripts/autogenerate.js +14 -6
  105. package/scripts/templates/MaplibreStyles.ts.ejs +99 -0
  106. package/scripts/templates/index.d.ts.ejs +71 -42
  107. package/scripts/templates/{styleMap.js.ejs → styleMap.ts.ejs} +3 -33
  108. package/setup-jest.js +1 -10
  109. package/tsconfig.json +20 -61
  110. package/index.d.ts +0 -955
  111. package/javascript/components/AbstractLayer.js +0 -75
  112. package/javascript/components/AbstractSource.js +0 -15
  113. package/javascript/components/BackgroundLayer.js +0 -97
  114. package/javascript/components/CircleLayer.js +0 -101
  115. package/javascript/components/FillExtrusionLayer.js +0 -98
  116. package/javascript/components/FillLayer.js +0 -94
  117. package/javascript/components/HeatmapLayer.js +0 -99
  118. package/javascript/components/ImageSource.js +0 -82
  119. package/javascript/components/Images.js +0 -119
  120. package/javascript/components/Light.js +0 -47
  121. package/javascript/components/LineLayer.js +0 -94
  122. package/javascript/components/MarkerView.js +0 -87
  123. package/javascript/components/NativeUserLocation.js +0 -41
  124. package/javascript/components/PointAnnotation.js +0 -216
  125. package/javascript/components/RasterLayer.js +0 -95
  126. package/javascript/components/RasterSource.js +0 -124
  127. package/javascript/components/ShapeSource.js +0 -372
  128. package/javascript/components/SymbolLayer.js +0 -120
  129. package/javascript/components/VectorSource.js +0 -200
  130. package/javascript/components/annotations/Annotation.js +0 -122
  131. package/javascript/index.js +0 -149
  132. package/javascript/utils/BridgeValue.js +0 -81
  133. package/javascript/utils/animated/AnimatedCoordinatesArray.js +0 -191
  134. package/javascript/utils/filterUtils.js +0 -7
  135. package/javascript/utils/geoUtils.js +0 -73
  136. package/javascript/utils/styleMap.js +0 -1932
  137. /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
@@ -0,0 +1,225 @@
1
+ #!/usr/bin/env node
2
+
3
+ const {existsSync} = require(`fs`);
4
+ const {createRequire} = require(`module`);
5
+ const {resolve} = require(`path`);
6
+
7
+ const relPnpApiPath = "../../../../.pnp.cjs";
8
+
9
+ const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10
+ const absRequire = createRequire(absPnpApiPath);
11
+
12
+ const moduleWrapper = tsserver => {
13
+ if (!process.versions.pnp) {
14
+ return tsserver;
15
+ }
16
+
17
+ const {isAbsolute} = require(`path`);
18
+ const pnpApi = require(`pnpapi`);
19
+
20
+ const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
21
+ const isPortal = str => str.startsWith("portal:/");
22
+ const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
23
+
24
+ const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
25
+ return `${locator.name}@${locator.reference}`;
26
+ }));
27
+
28
+ // VSCode sends the zip paths to TS using the "zip://" prefix, that TS
29
+ // doesn't understand. This layer makes sure to remove the protocol
30
+ // before forwarding it to TS, and to add it back on all returned paths.
31
+
32
+ function toEditorPath(str) {
33
+ // We add the `zip:` prefix to both `.zip/` paths and virtual paths
34
+ if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) {
35
+ // We also take the opportunity to turn virtual paths into physical ones;
36
+ // this makes it much easier to work with workspaces that list peer
37
+ // dependencies, since otherwise Ctrl+Click would bring us to the virtual
38
+ // file instances instead of the real ones.
39
+ //
40
+ // We only do this to modules owned by the the dependency tree roots.
41
+ // This avoids breaking the resolution when jumping inside a vendor
42
+ // with peer dep (otherwise jumping into react-dom would show resolution
43
+ // errors on react).
44
+ //
45
+ const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
46
+ if (resolved) {
47
+ const locator = pnpApi.findPackageLocator(resolved);
48
+ if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
49
+ str = resolved;
50
+ }
51
+ }
52
+
53
+ str = normalize(str);
54
+
55
+ if (str.match(/\.zip\//)) {
56
+ switch (hostInfo) {
57
+ // Absolute VSCode `Uri.fsPath`s need to start with a slash.
58
+ // VSCode only adds it automatically for supported schemes,
59
+ // so we have to do it manually for the `zip` scheme.
60
+ // The path needs to start with a caret otherwise VSCode doesn't handle the protocol
61
+ //
62
+ // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
63
+ //
64
+ // 2021-10-08: VSCode changed the format in 1.61.
65
+ // Before | ^zip:/c:/foo/bar.zip/package.json
66
+ // After | ^/zip//c:/foo/bar.zip/package.json
67
+ //
68
+ // 2022-04-06: VSCode changed the format in 1.66.
69
+ // Before | ^/zip//c:/foo/bar.zip/package.json
70
+ // After | ^/zip/c:/foo/bar.zip/package.json
71
+ //
72
+ // 2022-05-06: VSCode changed the format in 1.68
73
+ // Before | ^/zip/c:/foo/bar.zip/package.json
74
+ // After | ^/zip//c:/foo/bar.zip/package.json
75
+ //
76
+ case `vscode <1.61`: {
77
+ str = `^zip:${str}`;
78
+ } break;
79
+
80
+ case `vscode <1.66`: {
81
+ str = `^/zip/${str}`;
82
+ } break;
83
+
84
+ case `vscode <1.68`: {
85
+ str = `^/zip${str}`;
86
+ } break;
87
+
88
+ case `vscode`: {
89
+ str = `^/zip/${str}`;
90
+ } break;
91
+
92
+ // To make "go to definition" work,
93
+ // We have to resolve the actual file system path from virtual path
94
+ // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
95
+ case `coc-nvim`: {
96
+ str = normalize(resolved).replace(/\.zip\//, `.zip::`);
97
+ str = resolve(`zipfile:${str}`);
98
+ } break;
99
+
100
+ // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)
101
+ // We have to resolve the actual file system path from virtual path,
102
+ // everything else is up to neovim
103
+ case `neovim`: {
104
+ str = normalize(resolved).replace(/\.zip\//, `.zip::`);
105
+ str = `zipfile://${str}`;
106
+ } break;
107
+
108
+ default: {
109
+ str = `zip:${str}`;
110
+ } break;
111
+ }
112
+ } else {
113
+ str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`);
114
+ }
115
+ }
116
+
117
+ return str;
118
+ }
119
+
120
+ function fromEditorPath(str) {
121
+ switch (hostInfo) {
122
+ case `coc-nvim`: {
123
+ str = str.replace(/\.zip::/, `.zip/`);
124
+ // The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
125
+ // So in order to convert it back, we use .* to match all the thing
126
+ // before `zipfile:`
127
+ return process.platform === `win32`
128
+ ? str.replace(/^.*zipfile:\//, ``)
129
+ : str.replace(/^.*zipfile:/, ``);
130
+ } break;
131
+
132
+ case `neovim`: {
133
+ str = str.replace(/\.zip::/, `.zip/`);
134
+ // The path for neovim is in format of zipfile:///<pwd>/.yarn/...
135
+ return str.replace(/^zipfile:\/\//, ``);
136
+ } break;
137
+
138
+ case `vscode`:
139
+ default: {
140
+ return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
141
+ } break;
142
+ }
143
+ }
144
+
145
+ // Force enable 'allowLocalPluginLoads'
146
+ // TypeScript tries to resolve plugins using a path relative to itself
147
+ // which doesn't work when using the global cache
148
+ // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238
149
+ // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but
150
+ // TypeScript already does local loads and if this code is running the user trusts the workspace
151
+ // https://github.com/microsoft/vscode/issues/45856
152
+ const ConfiguredProject = tsserver.server.ConfiguredProject;
153
+ const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;
154
+ ConfiguredProject.prototype.enablePluginsWithOptions = function() {
155
+ this.projectService.allowLocalPluginLoads = true;
156
+ return originalEnablePluginsWithOptions.apply(this, arguments);
157
+ };
158
+
159
+ // And here is the point where we hijack the VSCode <-> TS communications
160
+ // by adding ourselves in the middle. We locate everything that looks
161
+ // like an absolute path of ours and normalize it.
162
+
163
+ const Session = tsserver.server.Session;
164
+ const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;
165
+ let hostInfo = `unknown`;
166
+
167
+ Object.assign(Session.prototype, {
168
+ onMessage(/** @type {string | object} */ message) {
169
+ const isStringMessage = typeof message === 'string';
170
+ const parsedMessage = isStringMessage ? JSON.parse(message) : message;
171
+
172
+ if (
173
+ parsedMessage != null &&
174
+ typeof parsedMessage === `object` &&
175
+ parsedMessage.arguments &&
176
+ typeof parsedMessage.arguments.hostInfo === `string`
177
+ ) {
178
+ hostInfo = parsedMessage.arguments.hostInfo;
179
+ if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
180
+ const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
181
+ // The RegExp from https://semver.org/ but without the caret at the start
182
+ /(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
183
+ ) ?? []).map(Number)
184
+
185
+ if (major === 1) {
186
+ if (minor < 61) {
187
+ hostInfo += ` <1.61`;
188
+ } else if (minor < 66) {
189
+ hostInfo += ` <1.66`;
190
+ } else if (minor < 68) {
191
+ hostInfo += ` <1.68`;
192
+ }
193
+ }
194
+ }
195
+ }
196
+
197
+ const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
198
+ return typeof value === 'string' ? fromEditorPath(value) : value;
199
+ });
200
+
201
+ return originalOnMessage.call(
202
+ this,
203
+ isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
204
+ );
205
+ },
206
+
207
+ send(/** @type {any} */ msg) {
208
+ return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {
209
+ return typeof value === `string` ? toEditorPath(value) : value;
210
+ })));
211
+ }
212
+ });
213
+
214
+ return tsserver;
215
+ };
216
+
217
+ if (existsSync(absPnpApiPath)) {
218
+ if (!process.versions.pnp) {
219
+ // Setup the environment to be able to require typescript/lib/tsserverlibrary.js
220
+ require(absPnpApiPath).setup();
221
+ }
222
+ }
223
+
224
+ // Defer to the real typescript/lib/tsserverlibrary.js your application uses
225
+ module.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`));
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ const {existsSync} = require(`fs`);
4
+ const {createRequire} = require(`module`);
5
+ const {resolve} = require(`path`);
6
+
7
+ const relPnpApiPath = "../../../../.pnp.cjs";
8
+
9
+ const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10
+ const absRequire = createRequire(absPnpApiPath);
11
+
12
+ if (existsSync(absPnpApiPath)) {
13
+ if (!process.versions.pnp) {
14
+ // Setup the environment to be able to require typescript/lib/typescript.js
15
+ require(absPnpApiPath).setup();
16
+ }
17
+ }
18
+
19
+ // Defer to the real typescript/lib/typescript.js your application uses
20
+ module.exports = absRequire(`typescript/lib/typescript.js`);
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "typescript",
3
+ "version": "4.9.4-sdk",
4
+ "main": "./lib/typescript.js",
5
+ "type": "commonjs"
6
+ }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ Please add unreleased changes in the following style:
5
5
  PR Title ([#123](link to my pr))
6
6
  ```
7
7
 
8
+ ## 10.0.0-alpha.1
9
+
10
+ fix: plugin for debug simulator ([#164](https://github.com/maplibre/maplibre-react-native/pull/164)
11
+
12
+ ## 10.0-alpha.0
13
+
14
+ chore: update detox ([#207](https://github.com/maplibre/maplibre-react-native/pull/207))
15
+ chore: update expo-config and expo-scripts ([#47](https://github.com/maplibre/maplibre-react-native/pull/104) and [#69](https://github.com/maplibre/maplibre-react-native/pull/69))
16
+ chore: update prettier and eslint-plugin-prettier ([#111](https://github.com/maplibre/maplibre-react-native/pull/111))
17
+ feat: **breaking** migrate repo to typescript ([#55](https://github.com/maplibre/maplibre-react-native/pull/55))
18
+
8
19
  ## 9.1.0
9
20
 
10
21
  Update react to 18.2.0 and react-native to 0.72.1. ([#49](https://github.com/maplibre/maplibre-react-native/pull/49))
@@ -6,24 +6,23 @@
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | id | `string` | `none` | `true` | FIX ME NO DESCRIPTION |
9
- | animated | `bool` | `false` | `false` | FIX ME NO DESCRIPTION |
9
+ | animated | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION |
10
10
  | animationDuration | `number` | `1000` | `false` | FIX ME NO DESCRIPTION |
11
- | animationEasingFunction | `func` | `Easing.linear` | `false` | FIX ME NO DESCRIPTION |
12
- | coordinates | `array` | `none` | `false` | FIX ME NO DESCRIPTION |
13
- | onPress | `func` | `none` | `false` | FIX ME NO DESCRIPTION |
14
- | children | `any` | `none` | `false` | FIX ME NO DESCRIPTION |
15
- | style | `any` | `none` | `false` | FIX ME NO DESCRIPTION |
16
- | icon | `union` | `none` | `false` | FIX ME NO DESCRIPTION |
11
+ | coordinates | `Array` | `none` | `false` | FIX ME NO DESCRIPTION |
12
+ | children | `ReactElement \| ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
13
+ | style | `object` | `none` | `false` | FIX ME NO DESCRIPTION |
14
+ | icon | `string \| number \| object` | `none` | `false` | FIX ME NO DESCRIPTION |
15
+ | animationEasingFunction | `FIX ME UNKNOWN TYPE` | `Easing.linear` | `false` | FIX ME NO DESCRIPTION |
17
16
 
18
17
  ### methods
19
- #### onPress()
18
+ #### onPress(event)
20
19
 
21
20
 
22
21
 
23
22
  ##### arguments
24
23
  | Name | Type | Required | Description |
25
24
  | ---- | :--: | :------: | :----------: |
26
-
25
+ | `event` | `OnPressEvent` | `Yes` | undefined |
27
26
 
28
27
 
29
28
  #### symbolStyle()
@@ -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 | `BackgroundLayerStyleProps` | `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/Callout.md CHANGED
@@ -6,10 +6,10 @@
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :--: | :-----: | :------: | :----------: |
8
8
  | title | `string` | `none` | `false` | String that get's displayed in the default callout. |
9
- | style | `any` | `none` | `false` | Style property for the Animated.View wrapper, apply animations to this |
10
- | containerStyle | `any` | `none` | `false` | Style property for the native RCTMGLCallout container, set at your own risk. |
11
- | contentStyle | `any` | `none` | `false` | Style property for the content bubble. |
12
- | tipStyle | `any` | `none` | `false` | Style property for the triangle tip under the content. |
13
- | textStyle | `any` | `none` | `false` | Style property for the title in the content bubble. |
9
+ | style | `ViewStyle` | `none` | `false` | Style property for the Animated.View wrapper, apply animations to this |
10
+ | containerStyle | `ViewStyle` | `none` | `false` | Style property for the native RCTMGLCallout container, set at your own risk. |
11
+ | contentStyle | `ViewStyle` | `none` | `false` | Style property for the content bubble. |
12
+ | tipStyle | `ViewStyle` | `none` | `false` | Style property for the triangle tip under the content. |
13
+ | textStyle | `ViewStyle` | `none` | `false` | Style property for the title in the content bubble. |
14
14
 
15
15
 
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
- | &nbsp;&nbsp;centerCoordinate | `array` | `none` | `false` | Center coordinate on map [lng, lat] |
13
- | &nbsp;&nbsp;padding | `shape` | `none` | `false` | Padding around edges of map in points |
14
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingLeft | `number` | `none` | `false` | Left padding in points |
15
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingRight | `number` | `none` | `false` | Right padding in points |
16
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingTop | `number` | `none` | `false` | Top padding in points |
17
- | &nbsp;&nbsp;&nbsp;&nbsp;paddingBottom | `number` | `none` | `false` | Bottom padding in points |
18
- | &nbsp;&nbsp;heading | `number` | `none` | `false` | Heading on map |
19
- | &nbsp;&nbsp;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