@rnmapbox/maps 10.0.0-beta.48 → 10.0.0-beta.53

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 (428) hide show
  1. package/android/.gitignore +9 -0
  2. package/android/.npmignore +9 -0
  3. package/android/rctmgl/.gitignore +1 -0
  4. package/android/rctmgl/.npmignore +1 -0
  5. package/android/rctmgl/build.gradle +2 -2
  6. package/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/modules/RCTMGLModule.java +2 -1
  7. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +16 -0
  8. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapViewManager.kt +7 -1
  9. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +0 -44
  10. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/modules/RCTMGLModule.kt +3 -1
  11. package/index.d.ts +2 -1
  12. package/ios/RCTMGL/MGLModule.m +2 -1
  13. package/ios/RCTMGL-v10/MGLModule.m +3 -1
  14. package/ios/RCTMGL-v10/MGLModule.swift +15 -2
  15. package/ios/RCTMGL-v10/RCTMGLMapView.swift +8 -0
  16. package/ios/RCTMGL-v10/RCTMGLMapViewManager.m +1 -0
  17. package/ios/RCTMGL-v10/RCTMGLStyle.swift +0 -36
  18. package/javascript/components/AbstractLayer.tsx +2 -1
  19. package/javascript/components/Camera.tsx +1 -2
  20. package/javascript/components/MapView.js +16 -4
  21. package/javascript/components/SymbolLayer.tsx +3 -3
  22. package/javascript/index.js +2 -2
  23. package/javascript/requestAndroidLocationPermissions.ts +1 -2
  24. package/javascript/utils/{MapboxStyles.ts → MapboxStyles.d.ts} +0 -18
  25. package/javascript/utils/StyleValue.ts +3 -8
  26. package/javascript/utils/styleMap.ts +0 -36
  27. package/lib/commonjs/classes/AnimatedCoordinatesArray.js +165 -0
  28. package/lib/commonjs/classes/AnimatedCoordinatesArray.js.map +1 -0
  29. package/lib/commonjs/classes/AnimatedExtractCoordinateFromArray.js +44 -0
  30. package/lib/commonjs/classes/AnimatedExtractCoordinateFromArray.js.map +1 -0
  31. package/lib/commonjs/classes/AnimatedPoint.js +117 -0
  32. package/lib/commonjs/classes/AnimatedPoint.js.map +1 -0
  33. package/lib/commonjs/classes/AnimatedRouteCoordinatesArray.js +155 -0
  34. package/lib/commonjs/classes/AnimatedRouteCoordinatesArray.js.map +1 -0
  35. package/lib/commonjs/classes/AnimatedShape.js +78 -0
  36. package/lib/commonjs/classes/AnimatedShape.js.map +1 -0
  37. package/lib/commonjs/classes/index.d.js +17 -0
  38. package/lib/commonjs/classes/index.d.js.map +1 -0
  39. package/lib/commonjs/classes/index.js +61 -0
  40. package/lib/commonjs/classes/index.js.map +1 -0
  41. package/lib/commonjs/components/AbstractLayer.js +61 -0
  42. package/lib/commonjs/components/AbstractLayer.js.map +1 -0
  43. package/lib/commonjs/components/AbstractSource.js +26 -0
  44. package/lib/commonjs/components/AbstractSource.js.map +1 -0
  45. package/lib/commonjs/components/Atmosphere.js +26 -0
  46. package/lib/commonjs/components/Atmosphere.js.map +1 -0
  47. package/lib/commonjs/components/BackgroundLayer.js +82 -0
  48. package/lib/commonjs/components/BackgroundLayer.js.map +1 -0
  49. package/lib/commonjs/components/Callout.js +119 -0
  50. package/lib/commonjs/components/Callout.js.map +1 -0
  51. package/lib/commonjs/components/Camera.js +336 -0
  52. package/lib/commonjs/components/Camera.js.map +1 -0
  53. package/lib/commonjs/components/CircleLayer.js +87 -0
  54. package/lib/commonjs/components/CircleLayer.js.map +1 -0
  55. package/lib/commonjs/components/FillExtrusionLayer.js +89 -0
  56. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -0
  57. package/lib/commonjs/components/FillLayer.js +89 -0
  58. package/lib/commonjs/components/FillLayer.js.map +1 -0
  59. package/lib/commonjs/components/HeadingIndicator.js +33 -0
  60. package/lib/commonjs/components/HeadingIndicator.js.map +1 -0
  61. package/lib/commonjs/components/HeatmapLayer.js +90 -0
  62. package/lib/commonjs/components/HeatmapLayer.js.map +1 -0
  63. package/lib/commonjs/components/ImageSource.js +66 -0
  64. package/lib/commonjs/components/ImageSource.js.map +1 -0
  65. package/lib/commonjs/components/Images.js +98 -0
  66. package/lib/commonjs/components/Images.js.map +1 -0
  67. package/lib/commonjs/components/Light.js +51 -0
  68. package/lib/commonjs/components/Light.js.map +1 -0
  69. package/lib/commonjs/components/LineLayer.js +89 -0
  70. package/lib/commonjs/components/LineLayer.js.map +1 -0
  71. package/lib/commonjs/components/MapView.js +740 -0
  72. package/lib/commonjs/components/MapView.js.map +1 -0
  73. package/lib/commonjs/components/MarkerView.js +102 -0
  74. package/lib/commonjs/components/MarkerView.js.map +1 -0
  75. package/lib/commonjs/components/NativeBridgeComponent.js +85 -0
  76. package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -0
  77. package/lib/commonjs/components/NativeUserLocation.js +41 -0
  78. package/lib/commonjs/components/NativeUserLocation.js.map +1 -0
  79. package/lib/commonjs/components/PointAnnotation.js +121 -0
  80. package/lib/commonjs/components/PointAnnotation.js.map +1 -0
  81. package/lib/commonjs/components/RasterDemSource.js +95 -0
  82. package/lib/commonjs/components/RasterDemSource.js.map +1 -0
  83. package/lib/commonjs/components/RasterLayer.js +85 -0
  84. package/lib/commonjs/components/RasterLayer.js.map +1 -0
  85. package/lib/commonjs/components/RasterSource.js +112 -0
  86. package/lib/commonjs/components/RasterSource.js.map +1 -0
  87. package/lib/commonjs/components/ShapeSource.js +193 -0
  88. package/lib/commonjs/components/ShapeSource.js.map +1 -0
  89. package/lib/commonjs/components/SkyLayer.js +73 -0
  90. package/lib/commonjs/components/SkyLayer.js.map +1 -0
  91. package/lib/commonjs/components/Style.js +269 -0
  92. package/lib/commonjs/components/Style.js.map +1 -0
  93. package/lib/commonjs/components/SymbolLayer.js +49 -0
  94. package/lib/commonjs/components/SymbolLayer.js.map +1 -0
  95. package/lib/commonjs/components/Terrain.js +37 -0
  96. package/lib/commonjs/components/Terrain.js.map +1 -0
  97. package/lib/commonjs/components/UserLocation.js +255 -0
  98. package/lib/commonjs/components/UserLocation.js.map +1 -0
  99. package/lib/commonjs/components/VectorSource.js +175 -0
  100. package/lib/commonjs/components/VectorSource.js.map +1 -0
  101. package/lib/commonjs/components/annotations/Annotation.js +105 -0
  102. package/lib/commonjs/components/annotations/Annotation.js.map +1 -0
  103. package/lib/commonjs/global.d.js +2 -0
  104. package/lib/commonjs/global.d.js.map +1 -0
  105. package/lib/commonjs/index.js +331 -0
  106. package/lib/commonjs/index.js.map +1 -0
  107. package/lib/commonjs/index.web.js +27 -0
  108. package/lib/commonjs/index.web.js.map +1 -0
  109. package/lib/commonjs/modules/location/locationManager.js +85 -0
  110. package/lib/commonjs/modules/location/locationManager.js.map +1 -0
  111. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +45 -0
  112. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -0
  113. package/lib/commonjs/modules/offline/OfflinePack.js +41 -0
  114. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -0
  115. package/lib/commonjs/modules/offline/offlineManager.js +356 -0
  116. package/lib/commonjs/modules/offline/offlineManager.js.map +1 -0
  117. package/lib/commonjs/modules/snapshot/SnapshotOptions.js +60 -0
  118. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -0
  119. package/lib/commonjs/modules/snapshot/snapshotManager.js +68 -0
  120. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -0
  121. package/lib/commonjs/requestAndroidLocationPermissions.js +25 -0
  122. package/lib/commonjs/requestAndroidLocationPermissions.js.map +1 -0
  123. package/lib/commonjs/types/index.js +6 -0
  124. package/lib/commonjs/types/index.js.map +1 -0
  125. package/lib/commonjs/utils/BridgeValue.js +66 -0
  126. package/lib/commonjs/utils/BridgeValue.js.map +1 -0
  127. package/lib/commonjs/utils/Logger.js +119 -0
  128. package/lib/commonjs/utils/Logger.js.map +1 -0
  129. package/lib/commonjs/utils/MapboxStyles.d.js +183 -0
  130. package/lib/commonjs/utils/MapboxStyles.d.js.map +1 -0
  131. package/lib/commonjs/utils/StyleValue.js +41 -0
  132. package/lib/commonjs/utils/StyleValue.js.map +1 -0
  133. package/lib/commonjs/utils/animated/Animated.js +33 -0
  134. package/lib/commonjs/utils/animated/Animated.js.map +1 -0
  135. package/lib/commonjs/utils/deprecation.js +40 -0
  136. package/lib/commonjs/utils/deprecation.js.map +1 -0
  137. package/lib/commonjs/utils/filterUtils.js +13 -0
  138. package/lib/commonjs/utils/filterUtils.js.map +1 -0
  139. package/lib/commonjs/utils/geoUtils.d.js +2 -0
  140. package/lib/commonjs/utils/geoUtils.d.js.map +1 -0
  141. package/lib/commonjs/utils/geoUtils.js +65 -0
  142. package/lib/commonjs/utils/geoUtils.js.map +1 -0
  143. package/lib/commonjs/utils/index.d.js +2 -0
  144. package/lib/commonjs/utils/index.d.js.map +1 -0
  145. package/lib/commonjs/utils/index.js +122 -0
  146. package/lib/commonjs/utils/index.js.map +1 -0
  147. package/lib/commonjs/utils/styleMap.js +1530 -0
  148. package/lib/commonjs/utils/styleMap.js.map +1 -0
  149. package/lib/commonjs/web/MapContext.js +12 -0
  150. package/lib/commonjs/web/MapContext.js.map +1 -0
  151. package/lib/commonjs/web/MapboxModule.js +21 -0
  152. package/lib/commonjs/web/MapboxModule.js.map +1 -0
  153. package/lib/commonjs/web/UnimplementedComponent.js +16 -0
  154. package/lib/commonjs/web/UnimplementedComponent.js.map +1 -0
  155. package/lib/commonjs/web/components/Camera.js +48 -0
  156. package/lib/commonjs/web/components/Camera.js.map +1 -0
  157. package/lib/commonjs/web/components/MapView.js +67 -0
  158. package/lib/commonjs/web/components/MapView.js.map +1 -0
  159. package/lib/commonjs/web/index.js +41 -0
  160. package/lib/commonjs/web/index.js.map +1 -0
  161. package/lib/commonjs/web/utils/Logger.js +100 -0
  162. package/lib/commonjs/web/utils/Logger.js.map +1 -0
  163. package/lib/module/classes/AnimatedCoordinatesArray.js +158 -0
  164. package/lib/module/classes/AnimatedCoordinatesArray.js.map +1 -0
  165. package/lib/module/classes/AnimatedExtractCoordinateFromArray.js +37 -0
  166. package/lib/module/classes/AnimatedExtractCoordinateFromArray.js.map +1 -0
  167. package/lib/module/classes/AnimatedPoint.js +110 -0
  168. package/lib/module/classes/AnimatedPoint.js.map +1 -0
  169. package/lib/module/classes/AnimatedRouteCoordinatesArray.js +148 -0
  170. package/lib/module/classes/AnimatedRouteCoordinatesArray.js.map +1 -0
  171. package/lib/module/classes/AnimatedShape.js +71 -0
  172. package/lib/module/classes/AnimatedShape.js.map +1 -0
  173. package/lib/module/classes/index.d.js +6 -0
  174. package/lib/module/classes/index.d.js.map +1 -0
  175. package/lib/module/classes/index.js +6 -0
  176. package/lib/module/classes/index.js.map +1 -0
  177. package/lib/module/components/AbstractLayer.js +54 -0
  178. package/lib/module/components/AbstractLayer.js.map +1 -0
  179. package/lib/module/components/AbstractSource.js +18 -0
  180. package/lib/module/components/AbstractSource.js.map +1 -0
  181. package/lib/module/components/Atmosphere.js +16 -0
  182. package/lib/module/components/Atmosphere.js.map +1 -0
  183. package/lib/module/components/BackgroundLayer.js +73 -0
  184. package/lib/module/components/BackgroundLayer.js.map +1 -0
  185. package/lib/module/components/Callout.js +110 -0
  186. package/lib/module/components/Callout.js.map +1 -0
  187. package/lib/module/components/Camera.js +326 -0
  188. package/lib/module/components/Camera.js.map +1 -0
  189. package/lib/module/components/CircleLayer.js +78 -0
  190. package/lib/module/components/CircleLayer.js.map +1 -0
  191. package/lib/module/components/FillExtrusionLayer.js +80 -0
  192. package/lib/module/components/FillExtrusionLayer.js.map +1 -0
  193. package/lib/module/components/FillLayer.js +80 -0
  194. package/lib/module/components/FillLayer.js.map +1 -0
  195. package/lib/module/components/HeadingIndicator.js +25 -0
  196. package/lib/module/components/HeadingIndicator.js.map +1 -0
  197. package/lib/module/components/HeatmapLayer.js +81 -0
  198. package/lib/module/components/HeatmapLayer.js.map +1 -0
  199. package/lib/module/components/ImageSource.js +57 -0
  200. package/lib/module/components/ImageSource.js.map +1 -0
  201. package/lib/module/components/Images.js +89 -0
  202. package/lib/module/components/Images.js.map +1 -0
  203. package/lib/module/components/Light.js +42 -0
  204. package/lib/module/components/Light.js.map +1 -0
  205. package/lib/module/components/LineLayer.js +80 -0
  206. package/lib/module/components/LineLayer.js.map +1 -0
  207. package/lib/module/components/MapView.js +730 -0
  208. package/lib/module/components/MapView.js.map +1 -0
  209. package/lib/module/components/MarkerView.js +93 -0
  210. package/lib/module/components/MarkerView.js.map +1 -0
  211. package/lib/module/components/NativeBridgeComponent.js +78 -0
  212. package/lib/module/components/NativeBridgeComponent.js.map +1 -0
  213. package/lib/module/components/NativeUserLocation.js +33 -0
  214. package/lib/module/components/NativeUserLocation.js.map +1 -0
  215. package/lib/module/components/PointAnnotation.js +112 -0
  216. package/lib/module/components/PointAnnotation.js.map +1 -0
  217. package/lib/module/components/RasterDemSource.js +86 -0
  218. package/lib/module/components/RasterDemSource.js.map +1 -0
  219. package/lib/module/components/RasterLayer.js +76 -0
  220. package/lib/module/components/RasterLayer.js.map +1 -0
  221. package/lib/module/components/RasterSource.js +103 -0
  222. package/lib/module/components/RasterSource.js.map +1 -0
  223. package/lib/module/components/ShapeSource.js +184 -0
  224. package/lib/module/components/ShapeSource.js.map +1 -0
  225. package/lib/module/components/SkyLayer.js +64 -0
  226. package/lib/module/components/SkyLayer.js.map +1 -0
  227. package/lib/module/components/Style.js +259 -0
  228. package/lib/module/components/Style.js.map +1 -0
  229. package/lib/module/components/SymbolLayer.js +40 -0
  230. package/lib/module/components/SymbolLayer.js.map +1 -0
  231. package/lib/module/components/Terrain.js +27 -0
  232. package/lib/module/components/Terrain.js.map +1 -0
  233. package/lib/module/components/UserLocation.js +246 -0
  234. package/lib/module/components/UserLocation.js.map +1 -0
  235. package/lib/module/components/VectorSource.js +166 -0
  236. package/lib/module/components/VectorSource.js.map +1 -0
  237. package/lib/module/components/annotations/Annotation.js +97 -0
  238. package/lib/module/components/annotations/Annotation.js.map +1 -0
  239. package/lib/module/global.d.js +2 -0
  240. package/lib/module/global.d.js.map +1 -0
  241. package/lib/module/index.js +105 -0
  242. package/lib/module/index.js.map +1 -0
  243. package/lib/module/index.web.js +3 -0
  244. package/lib/module/index.web.js.map +1 -0
  245. package/lib/module/modules/location/locationManager.js +77 -0
  246. package/lib/module/modules/location/locationManager.js.map +1 -0
  247. package/lib/module/modules/offline/OfflineCreatePackOptions.js +38 -0
  248. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -0
  249. package/lib/module/modules/offline/OfflinePack.js +34 -0
  250. package/lib/module/modules/offline/OfflinePack.js.map +1 -0
  251. package/lib/module/modules/offline/offlineManager.js +347 -0
  252. package/lib/module/modules/offline/offlineManager.js.map +1 -0
  253. package/lib/module/modules/snapshot/SnapshotOptions.js +53 -0
  254. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -0
  255. package/lib/module/modules/snapshot/snapshotManager.js +60 -0
  256. package/lib/module/modules/snapshot/snapshotManager.js.map +1 -0
  257. package/lib/module/requestAndroidLocationPermissions.js +19 -0
  258. package/lib/module/requestAndroidLocationPermissions.js.map +1 -0
  259. package/lib/module/types/index.js +2 -0
  260. package/lib/module/types/index.js.map +1 -0
  261. package/lib/module/utils/BridgeValue.js +59 -0
  262. package/lib/module/utils/BridgeValue.js.map +1 -0
  263. package/lib/module/utils/Logger.js +112 -0
  264. package/lib/module/utils/Logger.js.map +1 -0
  265. package/lib/module/utils/MapboxStyles.d.js +179 -0
  266. package/lib/module/utils/MapboxStyles.d.js.map +1 -0
  267. package/lib/module/utils/StyleValue.js +34 -0
  268. package/lib/module/utils/StyleValue.js.map +1 -0
  269. package/lib/module/utils/animated/Animated.js +25 -0
  270. package/lib/module/utils/animated/Animated.js.map +1 -0
  271. package/lib/module/utils/deprecation.js +33 -0
  272. package/lib/module/utils/deprecation.js.map +1 -0
  273. package/lib/module/utils/filterUtils.js +7 -0
  274. package/lib/module/utils/filterUtils.js.map +1 -0
  275. package/lib/module/utils/geoUtils.d.js +2 -0
  276. package/lib/module/utils/geoUtils.d.js.map +1 -0
  277. package/lib/module/utils/geoUtils.js +50 -0
  278. package/lib/module/utils/geoUtils.js.map +1 -0
  279. package/lib/module/utils/index.d.js +2 -0
  280. package/lib/module/utils/index.d.js.map +1 -0
  281. package/lib/module/utils/index.js +99 -0
  282. package/lib/module/utils/index.js.map +1 -0
  283. package/lib/module/utils/styleMap.js +1505 -0
  284. package/lib/module/utils/styleMap.js.map +1 -0
  285. package/lib/module/web/MapContext.js +4 -0
  286. package/lib/module/web/MapContext.js.map +1 -0
  287. package/lib/module/web/MapboxModule.js +13 -0
  288. package/lib/module/web/MapboxModule.js.map +1 -0
  289. package/lib/module/web/UnimplementedComponent.js +8 -0
  290. package/lib/module/web/UnimplementedComponent.js.map +1 -0
  291. package/lib/module/web/components/Camera.js +40 -0
  292. package/lib/module/web/components/Camera.js.map +1 -0
  293. package/lib/module/web/components/MapView.js +60 -0
  294. package/lib/module/web/components/MapView.js.map +1 -0
  295. package/lib/module/web/index.js +16 -0
  296. package/lib/module/web/index.js.map +1 -0
  297. package/lib/module/web/utils/Logger.js +93 -0
  298. package/lib/module/web/utils/Logger.js.map +1 -0
  299. package/lib/typescript/components/AbstractLayer.d.ts +28 -0
  300. package/lib/typescript/components/AbstractLayer.d.ts.map +1 -0
  301. package/lib/typescript/components/AbstractSource.d.ts +9 -0
  302. package/lib/typescript/components/AbstractSource.d.ts.map +1 -0
  303. package/lib/typescript/components/Atmosphere.d.ts +9 -0
  304. package/lib/typescript/components/Atmosphere.d.ts.map +1 -0
  305. package/lib/typescript/components/Camera.d.ts +119 -0
  306. package/lib/typescript/components/Camera.d.ts.map +1 -0
  307. package/lib/typescript/components/HeadingIndicator.d.ts +7 -0
  308. package/lib/typescript/components/HeadingIndicator.d.ts.map +1 -0
  309. package/lib/typescript/components/MarkerView.d.ts +52 -0
  310. package/lib/typescript/components/MarkerView.d.ts.map +1 -0
  311. package/lib/typescript/components/NativeBridgeComponent.d.ts +50 -0
  312. package/lib/typescript/components/NativeBridgeComponent.d.ts.map +1 -0
  313. package/lib/typescript/components/PointAnnotation.d.ts +162 -0
  314. package/lib/typescript/components/PointAnnotation.d.ts.map +1 -0
  315. package/lib/typescript/components/ShapeSource.d.ts +222 -0
  316. package/lib/typescript/components/ShapeSource.d.ts.map +1 -0
  317. package/lib/typescript/components/SymbolLayer.d.ts +65 -0
  318. package/lib/typescript/components/SymbolLayer.d.ts.map +1 -0
  319. package/lib/typescript/components/Terrain.d.ts +20 -0
  320. package/lib/typescript/components/Terrain.d.ts.map +1 -0
  321. package/lib/typescript/requestAndroidLocationPermissions.d.ts +2 -0
  322. package/lib/typescript/requestAndroidLocationPermissions.d.ts.map +1 -0
  323. package/lib/typescript/types/index.d.ts +16 -0
  324. package/lib/typescript/types/index.d.ts.map +1 -0
  325. package/lib/typescript/utils/BridgeValue.d.ts +46 -0
  326. package/lib/typescript/utils/BridgeValue.d.ts.map +1 -0
  327. package/lib/typescript/utils/StyleValue.d.ts +10 -0
  328. package/lib/typescript/utils/StyleValue.d.ts.map +1 -0
  329. package/lib/typescript/utils/deprecation.d.ts +12 -0
  330. package/lib/typescript/utils/deprecation.d.ts.map +1 -0
  331. package/lib/typescript/utils/filterUtils.d.ts +2 -0
  332. package/lib/typescript/utils/filterUtils.d.ts.map +1 -0
  333. package/lib/typescript/utils/styleMap.d.ts +1489 -0
  334. package/lib/typescript/utils/styleMap.d.ts.map +1 -0
  335. package/lib/typescript/web/MapContext.d.ts +7 -0
  336. package/lib/typescript/web/MapContext.d.ts.map +1 -0
  337. package/lib/typescript/web/components/Camera.d.ts +18 -0
  338. package/lib/typescript/web/components/Camera.d.ts.map +1 -0
  339. package/lib/typescript/web/components/MapView.d.ts +20 -0
  340. package/lib/typescript/web/components/MapView.d.ts.map +1 -0
  341. package/lib/typescript/web/utils/Logger.d.ts +48 -0
  342. package/lib/typescript/web/utils/Logger.d.ts.map +1 -0
  343. package/package.json +38 -6
  344. package/plugin/install.md +2 -2
  345. package/plugin/jest.config.js +1 -0
  346. package/plugin/src/withMapbox.ts +365 -0
  347. package/plugin/tsconfig.json +9 -0
  348. package/rnmapbox-maps.podspec +1 -1
  349. package/.eslintrc.js +0 -111
  350. package/.gitattributes +0 -1
  351. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -112
  352. package/.github/ISSUE_TEMPLATE/bug_setup.md +0 -23
  353. package/.github/ISSUE_TEMPLATE/feature.md +0 -15
  354. package/.github/dependabot.yml +0 -42
  355. package/.github/label-actions.yml +0 -26
  356. package/.github/pull_request_template.md +0 -27
  357. package/.github/stale.yml +0 -11
  358. package/.github/workflows/android-actions.yml +0 -56
  359. package/.github/workflows/bump-version.yml +0 -54
  360. package/.github/workflows/ios-actions.yml +0 -81
  361. package/.github/workflows/label-actions.yml +0 -17
  362. package/.github/workflows/on-push.yml +0 -131
  363. package/.github/workflows/publish.yml +0 -29
  364. package/.husky/pre-commit +0 -5
  365. package/.nvmrc +0 -2
  366. package/.prettierrc.js +0 -4
  367. package/.sonarcloud.properties +0 -15
  368. package/CONTRIBUTING.md +0 -30
  369. package/README-v10.md +0 -86
  370. package/RELEASE.md +0 -28
  371. package/app.plugin.js +0 -1
  372. package/babel.config.js +0 -9
  373. package/docs/Annotation.md +0 -39
  374. package/docs/Annotations.md +0 -20
  375. package/docs/Atmosphere.md +0 -265
  376. package/docs/BackgroundLayer.md +0 -166
  377. package/docs/Callout.md +0 -15
  378. package/docs/Camera.md +0 -152
  379. package/docs/CircleLayer.md +0 -470
  380. package/docs/CustomHttpHeaders.md +0 -89
  381. package/docs/FillExtrusionLayer.md +0 -433
  382. package/docs/FillLayer.md +0 -310
  383. package/docs/GettingStarted.md +0 -87
  384. package/docs/HeadingIndicator.md +0 -10
  385. package/docs/HeatmapLayer.md +0 -215
  386. package/docs/ImageSource.md +0 -13
  387. package/docs/Images.md +0 -12
  388. package/docs/Light.md +0 -159
  389. package/docs/LineLayer.md +0 -606
  390. package/docs/Logger.md +0 -22
  391. package/docs/MapView.md +0 -227
  392. package/docs/MapboxGL.md +0 -83
  393. package/docs/MarkerView.md +0 -26
  394. package/docs/NativeUserLocation.md +0 -11
  395. package/docs/OfflineManager.md +0 -264
  396. package/docs/PointAnnotation.md +0 -42
  397. package/docs/RasterDemSource.md +0 -15
  398. package/docs/RasterLayer.md +0 -357
  399. package/docs/RasterSource.md +0 -19
  400. package/docs/ShapeSource.md +0 -106
  401. package/docs/SkyLayer.md +0 -259
  402. package/docs/Style.md +0 -12
  403. package/docs/StyleSheet.md +0 -226
  404. package/docs/SymbolLayer.md +0 -1659
  405. package/docs/Terrain.md +0 -77
  406. package/docs/UserLocation.md +0 -39
  407. package/docs/VectorSource.md +0 -49
  408. package/docs/docs.json +0 -6601
  409. package/docs/snapshotManager.md +0 -55
  410. package/scripts/.eslintrc.js +0 -12
  411. package/scripts/autogenHelpers/DocJSONBuilder.js +0 -458
  412. package/scripts/autogenHelpers/JSDocNodeTree.js +0 -134
  413. package/scripts/autogenHelpers/MarkdownBuilder.js +0 -38
  414. package/scripts/autogenHelpers/globals.js +0 -518
  415. package/scripts/autogenerate.js +0 -542
  416. package/scripts/download-style-spec.sh +0 -15
  417. package/scripts/templates/MapboxStyles.ts.ejs +0 -97
  418. package/scripts/templates/RCTMGLStyle.h.ejs +0 -34
  419. package/scripts/templates/RCTMGLStyle.m.ejs +0 -106
  420. package/scripts/templates/RCTMGLStyle.swift.ejs +0 -116
  421. package/scripts/templates/RCTMGLStyleFactory.java.ejs +0 -108
  422. package/scripts/templates/RCTMGLStyleFactoryv10.java.ejs +0 -116
  423. package/scripts/templates/component.md.ejs +0 -122
  424. package/scripts/templates/index.d.ts.ejs +0 -56
  425. package/scripts/templates/styleMap.ts.ejs +0 -118
  426. package/setup-jest.js +0 -125
  427. package/style-spec/v8.json +0 -6692
  428. package/tsconfig.json +0 -24
@@ -0,0 +1,9 @@
1
+ *.iml
2
+ .gradle
3
+ /local.properties
4
+ /.idea/workspace.xml
5
+ /.idea/libraries
6
+ .DS_Store
7
+ /build
8
+ /captures
9
+ .externalNativeBuild
@@ -0,0 +1,9 @@
1
+ *.iml
2
+ .gradle
3
+ /local.properties
4
+ /.idea/workspace.xml
5
+ /.idea/libraries
6
+ .DS_Store
7
+ /build
8
+ /captures
9
+ .externalNativeBuild
@@ -0,0 +1 @@
1
+ /build
@@ -0,0 +1 @@
1
+ /build
@@ -130,8 +130,8 @@ dependencies {
130
130
  implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.1.0'
131
131
  }
132
132
  else if (safeExtGet("RNMapboxMapsImpl", defaultMapboxMapsImpl) == "mapbox") {
133
- implementation 'com.mapbox.maps:android:10.8.0'
134
- implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:6.4.0'
133
+ implementation 'com.mapbox.maps:android:10.9.0'
134
+ implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:6.8.0'
135
135
  }
136
136
  }
137
137
 
@@ -299,11 +299,12 @@ public class RCTMGLModule extends ReactContextBaseJavaModule {
299
299
  }
300
300
 
301
301
  @ReactMethod
302
- public void setAccessToken(final String accessToken) {
302
+ public void setAccessToken(final String accessToken, Promise promise) {
303
303
  mReactContext.runOnUiQueueThread(new Runnable() {
304
304
  @Override
305
305
  public void run() {
306
306
  InstanceManagerImpl.getInstance(getReactApplicationContext(), accessToken);
307
+ promise.resolve(accessToken);
307
308
  }
308
309
  });
309
310
  }
@@ -23,7 +23,10 @@ import com.mapbox.maps.extension.style.expressions.generated.Expression
23
23
  import com.mapbox.maps.extension.style.layers.Layer
24
24
  import com.mapbox.maps.extension.style.layers.generated.*
25
25
  import com.mapbox.maps.extension.style.layers.getLayer
26
+ import com.mapbox.maps.extension.style.layers.properties.generated.ProjectionName
26
27
  import com.mapbox.maps.extension.style.layers.properties.generated.Visibility
28
+ import com.mapbox.maps.extension.style.projection.generated.Projection
29
+ import com.mapbox.maps.extension.style.projection.generated.setProjection
27
30
  import com.mapbox.maps.plugin.annotation.Annotation
28
31
  import com.mapbox.maps.plugin.annotation.annotations
29
32
  import com.mapbox.maps.plugin.annotation.generated.*
@@ -89,6 +92,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
89
92
  private val mImages: MutableList<RCTMGLImages>
90
93
  private var mPointAnnotationManager: PointAnnotationManager? = null
91
94
  private var mActiveMarkerID: Long = -1
95
+ private var mProjection: ProjectionName = ProjectionName.MERCATOR
92
96
  private var mStyleURL: String? = null
93
97
  val isDestroyed = false
94
98
  private var mCamera: RCTMGLCamera? = null
@@ -394,6 +398,16 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
394
398
  return true
395
399
  }
396
400
 
401
+ fun setReactProjection(projection: ProjectionName) {
402
+ if (projection != null) {
403
+ mProjection = projection
404
+ }
405
+
406
+ if (mMap != null) {
407
+ mMap.getStyle()?.setProjection(Projection(projection))
408
+ }
409
+ }
410
+
397
411
  fun setReactStyleURL(styleURL: String) {
398
412
  mStyleURL = styleURL
399
413
  if (mMap != null) {
@@ -401,6 +415,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
401
415
  if (isJSONValid(mStyleURL)) {
402
416
  mMap.loadStyleJson(styleURL, object : Style.OnStyleLoaded {
403
417
  override fun onStyleLoaded(style: Style) {
418
+ style.setProjection(Projection(mProjection))
404
419
  addAllFeaturesToMap()
405
420
  }
406
421
  })
@@ -408,6 +423,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
408
423
  mMap.loadStyleUri(styleURL, object : Style.OnStyleLoaded {
409
424
  override fun onStyleLoaded(style: Style) {
410
425
  savedStyle = style
426
+ style.setProjection(Projection(mProjection))
411
427
  addAllFeaturesToMap()
412
428
  }
413
429
  },
@@ -11,6 +11,7 @@ import com.facebook.react.uimanager.annotations.ReactProp
11
11
  import com.mapbox.rctmgl.events.constants.EventKeys
12
12
  import com.mapbox.maps.MapboxMap
13
13
  import com.facebook.react.common.MapBuilder
14
+ import com.mapbox.maps.extension.style.layers.properties.generated.ProjectionName
14
15
  import com.mapbox.maps.plugin.compass.compass
15
16
  import com.mapbox.maps.plugin.gestures.gestures
16
17
  import com.mapbox.maps.plugin.logo.logo
@@ -78,7 +79,12 @@ open class RCTMGLMapViewManager(context: ReactApplicationContext?) :
78
79
  return mViews[reactTag]
79
80
  }
80
81
 
81
- //region React Props
82
+ // region React Props
83
+ @ReactProp(name = "projection")
84
+ fun setProjection(mapView: RCTMGLMapView, projection: String?) {
85
+ mapView.setReactProjection( if (projection == "globe") ProjectionName.GLOBE else ProjectionName.MERCATOR )
86
+ }
87
+
82
88
  @ReactProp(name = "styleURL")
83
89
  fun setStyleURL(mapView: RCTMGLMapView, styleURL: String?) {
84
90
  mapView.setReactStyleURL(styleURL!!)
@@ -594,18 +594,6 @@ public class RCTMGLStyleFactory {
594
594
  case "fillExtrusionVerticalGradient":
595
595
  RCTMGLStyleFactory.setFillExtrusionVerticalGradient(layer, styleValue);
596
596
  break;
597
- case "fillExtrusionAmbientOcclusionIntensity":
598
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionIntensity(layer, styleValue);
599
- break;
600
- case "fillExtrusionAmbientOcclusionIntensityTransition":
601
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionIntensityTransition(layer, styleValue);
602
- break;
603
- case "fillExtrusionAmbientOcclusionRadius":
604
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionRadius(layer, styleValue);
605
- break;
606
- case "fillExtrusionAmbientOcclusionRadiusTransition":
607
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionRadiusTransition(layer, styleValue);
608
- break;
609
597
  }
610
598
  }
611
599
  }
@@ -2129,38 +2117,6 @@ public class RCTMGLStyleFactory {
2129
2117
  }
2130
2118
  }
2131
2119
 
2132
- public static void setFillExtrusionAmbientOcclusionIntensity(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2133
- if (styleValue.isExpression()) {
2134
- layer.fillExtrusionAmbientOcclusionIntensity(styleValue.getExpression());
2135
- } else {
2136
- layer.fillExtrusionAmbientOcclusionIntensity(styleValue.getFloat(VALUE_KEY));
2137
- }
2138
- }
2139
-
2140
-
2141
- public static void setFillExtrusionAmbientOcclusionIntensityTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2142
- StyleTransition transition = styleValue.getTransition();
2143
- if (transition != null) {
2144
- layer.fillExtrusionAmbientOcclusionIntensityTransition(transition);
2145
- }
2146
- }
2147
-
2148
- public static void setFillExtrusionAmbientOcclusionRadius(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2149
- if (styleValue.isExpression()) {
2150
- layer.fillExtrusionAmbientOcclusionRadius(styleValue.getExpression());
2151
- } else {
2152
- layer.fillExtrusionAmbientOcclusionRadius(styleValue.getFloat(VALUE_KEY));
2153
- }
2154
- }
2155
-
2156
-
2157
- public static void setFillExtrusionAmbientOcclusionRadiusTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2158
- StyleTransition transition = styleValue.getTransition();
2159
- if (transition != null) {
2160
- layer.fillExtrusionAmbientOcclusionRadiusTransition(transition);
2161
- }
2162
- }
2163
-
2164
2120
  public static void setVisibility(RasterLayer layer, RCTMGLStyleValue styleValue) {
2165
2121
  layer.visibility(Visibility.valueOf(styleValue.getEnumName()));
2166
2122
  }
@@ -1,6 +1,7 @@
1
1
  package com.mapbox.rctmgl.modules
2
2
 
3
3
  import android.os.Handler
4
+ import com.facebook.react.bridge.Promise
4
5
  import com.mapbox.maps.extension.style.layers.properties.generated.LineJoin
5
6
  import com.mapbox.maps.ResourceOptionsManager.Companion.getDefault
6
7
  import com.facebook.react.module.annotations.ReactModule
@@ -112,11 +113,12 @@ class RCTMGLModule(private val mReactContext: ReactApplicationContext) : ReactCo
112
113
  }
113
114
 
114
115
  @ReactMethod
115
- fun setAccessToken(accessToken: String?) {
116
+ fun setAccessToken(accessToken: String?, promise: Promise) {
116
117
  mReactContext.runOnUiQueueThread(Runnable {
117
118
  getDefault(
118
119
  reactApplicationContext, accessToken
119
120
  )
121
+ promise.resolve(accessToken)
120
122
  })
121
123
  }
122
124
 
package/index.d.ts CHANGED
@@ -129,7 +129,7 @@ export type OnPressEvent = {
129
129
  declare namespace MapboxGL {
130
130
  function removeCustomHeader(headerName: string): void;
131
131
  function addCustomHeader(headerName: string, headerValue: string): void;
132
- function setAccessToken(accessToken: string | null): void;
132
+ function setAccessToken(accessToken: string | null): Promise<string | null>;
133
133
  function setWellKnownTileServer(tileServer: string): void;
134
134
  function getAccessToken(): Promise<string>;
135
135
  function setTelemetryEnabled(telemetryEnabled: boolean): void;
@@ -526,6 +526,7 @@ export interface MapViewProps extends ViewProps {
526
526
  userTrackingMode?: MapboxGL.UserTrackingModes;
527
527
  userLocationVerticalAlignment?: number;
528
528
  contentInset?: Array<number>;
529
+ projection?: 'mercator' | 'globe';
529
530
  style?: StyleProp<ViewStyle>;
530
531
  styleURL?: string;
531
532
  styleJSON?: string;
@@ -263,7 +263,7 @@ RCT_EXPORT_MODULE();
263
263
  };
264
264
  }
265
265
 
266
- RCT_EXPORT_METHOD(setAccessToken:(NSString *)accessToken)
266
+ RCT_EXPORT_METHOD(setAccessToken:(NSString *)accessToken resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
267
267
  {
268
268
  #ifdef RNMBGL_USE_MAPLIBRE
269
269
  if (accessToken.length > 0) {
@@ -272,6 +272,7 @@ RCT_EXPORT_METHOD(setAccessToken:(NSString *)accessToken)
272
272
  #else
273
273
  [MGLAccountManager setAccessToken:accessToken];
274
274
  #endif
275
+ resolve(accessToken);
275
276
  }
276
277
 
277
278
  RCT_EXPORT_METHOD(setWellKnownTileServer:(NSString*)tileServer)
@@ -2,9 +2,11 @@
2
2
 
3
3
  @interface RCT_EXTERN_MODULE(MGLModule, NSObject)
4
4
 
5
- RCT_EXTERN_METHOD(setAccessToken:)
5
+ RCT_EXTERN_METHOD(setAccessToken:(NSString *)accessToken resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
6
6
 
7
7
  RCT_EXTERN_METHOD(addCustomHeader:(NSString *)headerName forHeaderValue:(NSString *) headerValue)
8
8
  RCT_EXTERN_METHOD(removeCustomHeader:(NSString *)headerName)
9
9
 
10
+ RCT_EXTERN_METHOD(setTelemetryEnabled:(BOOL)telemetryEnabled )
11
+
10
12
  @end
@@ -1,5 +1,6 @@
1
1
  import Foundation
2
2
  import MapboxMaps
3
+ import MapboxMobileEvents
3
4
 
4
5
 
5
6
  let DEFAULT_SOURCE_ID = "composite";
@@ -31,7 +32,11 @@ class MGLModule : NSObject {
31
32
  "StyleSource":
32
33
  ["DefaultSourceID": DEFAULT_SOURCE_ID],
33
34
  "LineJoin":
34
- ["Round": LineJoin.round],
35
+ [
36
+ "Bevel": LineJoin.bevel.rawValue,
37
+ "Round": LineJoin.round.rawValue,
38
+ "Miter": LineJoin.miter.rawValue,
39
+ ],
35
40
  "LocationCallbackName":
36
41
  ["Update": RCT_MAPBOX_USER_LOCATION_UPDATE],
37
42
  "CameraModes":
@@ -65,8 +70,12 @@ class MGLModule : NSObject {
65
70
  return true
66
71
  }
67
72
 
68
- @objc func setAccessToken(_ token: String) {
73
+ @objc func setAccessToken(
74
+ _ token: String,
75
+ resolver: RCTPromiseResolveBlock,
76
+ rejecter: RCTPromiseRejectBlock) {
69
77
  MGLModule.accessToken = token
78
+ resolver(token)
70
79
  }
71
80
 
72
81
  @objc func addCustomHeader(_ headerName: String, forHeaderValue headerValue: String ) {
@@ -76,4 +85,8 @@ class MGLModule : NSObject {
76
85
  @objc func removeCustomHeader(_ headerName: String) {
77
86
  CustomHttpHeaders.shared.customHeaders[headerName] = nil
78
87
  }
88
+
89
+ @objc func setTelemetryEnabled(_ telemetryEnabled: Bool) {
90
+ UserDefaults.mme_configuration().mme_isCollectionEnabled = telemetryEnabled
91
+ }
79
92
  }
@@ -135,6 +135,14 @@ open class RCTMGLMapView : MapView {
135
135
 
136
136
 
137
137
  // MARK: - React Native properties
138
+
139
+ @objc func setReactProjection(_ value: String?) {
140
+ if let value = value {
141
+ var projection = StyleProjection(name: value == "globe" ? .globe : .mercator)
142
+ try! self.mapboxMap.style.setProjection(projection)
143
+ }
144
+ }
145
+
138
146
 
139
147
  @objc func setReactAttributionEnabled(_ value: Bool) {
140
148
  mapView.ornaments.options.attributionButton.visibility = value ? .visible : .hidden
@@ -21,6 +21,7 @@ RCT_REMAP_VIEW_PROPERTY(scrollEnabled, reactScrollEnabled, BOOL)
21
21
  RCT_REMAP_VIEW_PROPERTY(rotateEnabled, reactRotateEnabled, BOOL)
22
22
  RCT_REMAP_VIEW_PROPERTY(pitchEnabled, reactPitchEnabled, BOOL)
23
23
 
24
+ RCT_REMAP_VIEW_PROPERTY(projection, reactProjection, NSString)
24
25
 
25
26
  RCT_REMAP_VIEW_PROPERTY(styleURL, reactStyleURL, NSString)
26
27
  RCT_REMAP_VIEW_PROPERTY(onPress, reactOnPress, RCTBubblingEventBlock)
@@ -516,14 +516,6 @@ func fillExtrusionLayer(layer: inout FillExtrusionLayer, reactStyle:Dictionary<S
516
516
  self.setFillExtrusionBaseTransition(&layer, styleValue:styleValue);
517
517
  } else if (prop == "fillExtrusionVerticalGradient") {
518
518
  self.setFillExtrusionVerticalGradient(&layer, styleValue:styleValue);
519
- } else if (prop == "fillExtrusionAmbientOcclusionIntensity") {
520
- self.setFillExtrusionAmbientOcclusionIntensity(&layer, styleValue:styleValue);
521
- } else if (prop == "fillExtrusionAmbientOcclusionIntensityTransition") {
522
- self.setFillExtrusionAmbientOcclusionIntensityTransition(&layer, styleValue:styleValue);
523
- } else if (prop == "fillExtrusionAmbientOcclusionRadius") {
524
- self.setFillExtrusionAmbientOcclusionRadius(&layer, styleValue:styleValue);
525
- } else if (prop == "fillExtrusionAmbientOcclusionRadiusTransition") {
526
- self.setFillExtrusionAmbientOcclusionRadiusTransition(&layer, styleValue:styleValue);
527
519
  } else {
528
520
  Logger.log(level:.error, message: "Unexpected property \(prop) for layer: fill-extrusion")
529
521
  }
@@ -2027,34 +2019,6 @@ func setFillExtrusionVerticalGradient(_ layer: inout FillExtrusionLayer, styleVa
2027
2019
 
2028
2020
  }
2029
2021
 
2030
- func setFillExtrusionAmbientOcclusionIntensity(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2031
- {
2032
-
2033
-
2034
- layer.fillExtrusionAmbientOcclusionIntensity = styleValue.mglStyleValueNumber();
2035
-
2036
-
2037
- }
2038
-
2039
- func setFillExtrusionAmbientOcclusionIntensityTransition(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2040
- {
2041
- layer.fillExtrusionAmbientOcclusionIntensityTransition = styleValue.getTransition();
2042
- }
2043
-
2044
- func setFillExtrusionAmbientOcclusionRadius(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2045
- {
2046
-
2047
-
2048
- layer.fillExtrusionAmbientOcclusionRadius = styleValue.mglStyleValueNumber();
2049
-
2050
-
2051
- }
2052
-
2053
- func setFillExtrusionAmbientOcclusionRadiusTransition(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2054
- {
2055
- layer.fillExtrusionAmbientOcclusionRadiusTransition = styleValue.getTransition();
2056
- }
2057
-
2058
2022
 
2059
2023
 
2060
2024
  func setRasterStyleLayerVisibility(_ layer: inout RasterLayer, styleValue: RCTMGLStyleValue)
@@ -3,8 +3,8 @@ import React from 'react';
3
3
  import { NativeMethods, processColor } from 'react-native';
4
4
 
5
5
  import { getFilter } from '../utils/filterUtils';
6
- import { transformStyle } from '../utils/StyleValue';
7
6
  import { AllLayerStyleProps, Expression } from '../utils/MapboxStyles';
7
+ import { transformStyle } from '../utils/StyleValue';
8
8
 
9
9
  type PropsBase = {
10
10
  id: string;
@@ -52,6 +52,7 @@ class AbstractLayer<
52
52
  if (styleType === 'color') {
53
53
  return processColor;
54
54
  }
55
+ return undefined;
55
56
  }
56
57
 
57
58
  getStyle(style: AllLayerStyleProps) {
@@ -1,3 +1,4 @@
1
+ import { Position } from '@turf/helpers';
1
2
  import React, {
2
3
  forwardRef,
3
4
  memo,
@@ -7,7 +8,6 @@ import React, {
7
8
  useRef,
8
9
  } from 'react';
9
10
  import { NativeModules, requireNativeComponent } from 'react-native';
10
- import { Position } from '@turf/helpers';
11
11
 
12
12
  import { MapboxGLEvent } from '../types';
13
13
  import { makeLatLngBounds, makePoint } from '../utils/geoUtils';
@@ -234,7 +234,6 @@ export const Camera = memo(
234
234
  followHeading,
235
235
  defaultSettings,
236
236
  allowUpdates = true,
237
- triggerKey,
238
237
  onUserTrackingModeChange,
239
238
  } = props;
240
239
 
@@ -57,6 +57,11 @@ class MapView extends NativeBridgeComponent(
57
57
  PropTypes.number,
58
58
  ]),
59
59
 
60
+ /**
61
+ * The projection used when rendering the map
62
+ */
63
+ projection: PropTypes.oneOf(['mercator', 'globe']),
64
+
60
65
  /**
61
66
  * Style for wrapping React Native View
62
67
  */
@@ -294,6 +299,7 @@ class MapView extends NativeBridgeComponent(
294
299
  };
295
300
 
296
301
  static defaultProps = {
302
+ projection: 'mercator',
297
303
  localizeLabels: false,
298
304
  scrollEnabled: true,
299
305
  pitchEnabled: true,
@@ -391,21 +397,27 @@ class MapView extends NativeBridgeComponent(
391
397
  );
392
398
  if (props.onRegionDidChange) {
393
399
  console.warn(
394
- 'rnmapbox/maps: only one of MapView.onRegionDidChange or onMapIdle is supported',
400
+ 'rnmapbox/maps: only one of MapView.onRegionDidChange or onMapIdle is supported',
395
401
  );
396
402
  }
397
403
  }
398
404
  if (addIfHasHandler('CameraChanged')) {
399
405
  console.warn(
400
- 'onCameraChanged is deprecated and will be removed in next beta - please use onRegionWillChange',
406
+ 'onCameraChanged is deprecated and will be removed in next beta - please use onRegionIsChanging',
401
407
  );
402
- if (props.onRegionWillChange) {
408
+ if (props.onRegionIsChanging) {
403
409
  console.warn(
404
- 'rnmapbox/maps: only one of MapView.onRegionWillChange or onCameraChanged is supported',
410
+ 'rnmapbox/maps: only one of MapView.onRegionIsChanging or onCameraChanged is supported',
405
411
  );
406
412
  }
407
413
  }
408
414
 
415
+ if (props.onRegionWillChange) {
416
+ console.warn(
417
+ 'onRegionWillChange is deprecated and will be removed in v10 - please use onRegionIsChanging',
418
+ );
419
+ }
420
+
409
421
  this._runNativeCommand('setHandledMapChangedEvents', this._nativeRef, [
410
422
  events,
411
423
  ]);
@@ -82,12 +82,12 @@ export class SymbolLayer extends AbstractLayer<Props, NativeTypeProps> {
82
82
  _shouldSnapshot() {
83
83
  let isSnapshot = false;
84
84
 
85
- if (React.Children.count(this.props.children) <= 0) {
85
+ if (React.Children.count(this.baseProps.children) <= 0) {
86
86
  return isSnapshot;
87
87
  }
88
88
 
89
- React.Children.forEach(this.props.children, (child) => {
90
- if (child !== undefined && 'type' in child && child.type === View) {
89
+ React.Children.forEach(this.baseProps.children, (child) => {
90
+ if (child?.type === View) {
91
91
  isSnapshot = true;
92
92
  }
93
93
  });
@@ -1,6 +1,6 @@
1
1
  import { NativeModules } from 'react-native';
2
2
 
3
- import { Camera, UserTrackingModes } from './components/Camera';
3
+ import { Camera, UserTrackingMode } from './components/Camera';
4
4
  import { Atmosphere } from './components/Atmosphere';
5
5
  import MapView from './components/MapView';
6
6
  import Light from './components/Light';
@@ -45,7 +45,7 @@ const MapboxGL = { ...NativeModules.MGLModule };
45
45
 
46
46
  // static methods
47
47
  MapboxGL.requestAndroidLocationPermissions = requestAndroidLocationPermissions;
48
- MapboxGL.UserTrackingModes = UserTrackingModes;
48
+ MapboxGL.UserTrackingModes = UserTrackingMode;
49
49
 
50
50
  // components
51
51
  MapboxGL.MapView = MapView;
@@ -1,5 +1,4 @@
1
- import { number } from 'prop-types';
2
- import { PermissionsAndroid, Permission } from 'react-native';
1
+ import { Permission, PermissionsAndroid } from 'react-native';
3
2
 
4
3
  import { isAndroid } from './utils';
5
4
 
@@ -1258,24 +1258,6 @@ export interface FillExtrusionLayerStyleProps {
1258
1258
  * Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.
1259
1259
  */
1260
1260
  fillExtrusionVerticalGradient?: Value<boolean, ['zoom']>;
1261
- /**
1262
- * Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.
1263
- */
1264
- fillExtrusionAmbientOcclusionIntensity?: Value<number, ['zoom']>;
1265
-
1266
- /**
1267
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionIntensity property.
1268
- */
1269
- fillExtrusionAmbientOcclusionIntensityTransition?: Transition;
1270
- /**
1271
- * The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.
1272
- */
1273
- fillExtrusionAmbientOcclusionRadius?: Value<number, ['zoom']>;
1274
-
1275
- /**
1276
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionRadius property.
1277
- */
1278
- fillExtrusionAmbientOcclusionRadiusTransition?: Transition;
1279
1261
  }
1280
1262
  export interface RasterLayerStyleProps {
1281
1263
  /**
@@ -1,16 +1,11 @@
1
- import {
2
- Image,
3
- ImageResolvedAssetSource,
4
- processColor,
5
- ProcessedColorValue,
6
- } from 'react-native';
1
+ import { Image, processColor } from 'react-native';
7
2
 
8
- import { getStyleType } from './styleMap';
9
3
  import BridgeValue, {
10
- type StyleValueJSON,
11
4
  type RawValueType,
5
+ type StyleValueJSON,
12
6
  } from './BridgeValue';
13
7
  import { AllLayerStyleProps } from './MapboxStyles';
8
+ import { getStyleType } from './styleMap';
14
9
 
15
10
  export type StyleValue = {
16
11
  styletype: string;
@@ -1196,38 +1196,6 @@ export const FillExtrusionLayerStyleProp = PropTypes.shape({
1196
1196
  PropTypes.bool,
1197
1197
  PropTypes.array,
1198
1198
  ]),
1199
-
1200
- /**
1201
- * Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.
1202
- */
1203
- fillExtrusionAmbientOcclusionIntensity: PropTypes.oneOfType([
1204
- PropTypes.number,
1205
- PropTypes.array,
1206
- ]),
1207
-
1208
- /**
1209
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionIntensity property.
1210
- */
1211
- fillExtrusionAmbientOcclusionIntensityTransition: PropTypes.shape({
1212
- duration: PropTypes.number,
1213
- delay: PropTypes.number,
1214
- }),
1215
-
1216
- /**
1217
- * The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.
1218
- */
1219
- fillExtrusionAmbientOcclusionRadius: PropTypes.oneOfType([
1220
- PropTypes.number,
1221
- PropTypes.array,
1222
- ]),
1223
-
1224
- /**
1225
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionRadius property.
1226
- */
1227
- fillExtrusionAmbientOcclusionRadiusTransition: PropTypes.shape({
1228
- duration: PropTypes.number,
1229
- delay: PropTypes.number,
1230
- }),
1231
1199
  });
1232
1200
 
1233
1201
  export const RasterLayerStyleProp = PropTypes.shape({
@@ -1847,10 +1815,6 @@ const styleMap = {
1847
1815
  fillExtrusionBase: StyleTypes.Constant,
1848
1816
  fillExtrusionBaseTransition: StyleTypes.Transition,
1849
1817
  fillExtrusionVerticalGradient: StyleTypes.Constant,
1850
- fillExtrusionAmbientOcclusionIntensity: StyleTypes.Constant,
1851
- fillExtrusionAmbientOcclusionIntensityTransition: StyleTypes.Transition,
1852
- fillExtrusionAmbientOcclusionRadius: StyleTypes.Constant,
1853
- fillExtrusionAmbientOcclusionRadiusTransition: StyleTypes.Transition,
1854
1818
 
1855
1819
  rasterOpacity: StyleTypes.Constant,
1856
1820
  rasterOpacityTransition: StyleTypes.Transition,