@rnmapbox/maps 10.0.0-beta.75 → 10.0.0-beta.77

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 (298) hide show
  1. package/README.md +3 -3
  2. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/images/RCTMGLImagesManager.kt +5 -5
  3. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyle.kt +7 -1
  4. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +5 -5
  5. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTLayer.kt +37 -10
  6. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.kt +21 -0
  7. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.kt +65 -0
  8. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayer.kt +40 -0
  9. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayerManager.kt +76 -0
  10. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayer.kt +43 -0
  11. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayerManager.kt +76 -0
  12. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayer.kt +40 -0
  13. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayerManager.kt +76 -0
  14. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayer.kt +40 -0
  15. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayerManager.kt +76 -0
  16. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayer.kt +40 -0
  17. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayerManager.kt +76 -0
  18. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayer.kt +18 -0
  19. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayerManager.kt +65 -0
  20. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSkyLayerManager.kt +76 -0
  21. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayer.kt +40 -0
  22. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayerManager.kt +76 -0
  23. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSource.kt +69 -0
  24. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.kt +54 -0
  25. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSource.kt +82 -0
  26. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSourceManager.kt +30 -0
  27. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSource.kt +37 -0
  28. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSourceManager.kt +32 -0
  29. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSource.kt +5 -0
  30. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSourceManager.kt +10 -4
  31. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSource.kt +44 -0
  32. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.kt +69 -0
  33. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSource.kt +78 -0
  34. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSourceManager.kt +69 -0
  35. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTSource.kt +101 -85
  36. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/events/PointAnnotationDragEvent.java +4 -2
  37. package/ios/RCTMGL-v10/RCMTGLImage.swift +2 -1
  38. package/ios/RCTMGL-v10/RCTMGLCamera.swift +11 -31
  39. package/ios/RCTMGL-v10/RCTMGLImages.swift +57 -17
  40. package/ios/RCTMGL-v10/RCTMGLInteractiveElement.swift +13 -1
  41. package/ios/RCTMGL-v10/RCTMGLLayer.swift +35 -6
  42. package/ios/RCTMGL-v10/RCTMGLLocationModule.swift +27 -4
  43. package/ios/RCTMGL-v10/RCTMGLMapView.swift +15 -3
  44. package/ios/RCTMGL-v10/RCTMGLSource.swift +35 -17
  45. package/ios/RCTMGL-v10/RCTMGLUtils.swift +14 -5
  46. package/javascript/MGLModule.ts +54 -0
  47. package/javascript/Mapbox.ts +100 -0
  48. package/javascript/classes/index.d.ts +20 -1
  49. package/javascript/components/AbstractLayer.tsx +2 -1
  50. package/javascript/components/Annotation.tsx +141 -0
  51. package/javascript/components/BackgroundLayer.tsx +6 -1
  52. package/javascript/components/{Callout.js → Callout.tsx} +53 -45
  53. package/javascript/components/CircleLayer.tsx +5 -0
  54. package/javascript/components/FillExtrusionLayer.tsx +6 -1
  55. package/javascript/components/FillLayer.tsx +5 -0
  56. package/javascript/components/HeadingIndicator.tsx +24 -13
  57. package/javascript/components/HeatmapLayer.tsx +6 -1
  58. package/javascript/components/ImageSource.tsx +6 -1
  59. package/javascript/components/Images.tsx +58 -6
  60. package/javascript/components/LineLayer.tsx +5 -0
  61. package/javascript/components/MapView.tsx +1 -1
  62. package/javascript/components/MarkerView.tsx +3 -2
  63. package/javascript/components/PointAnnotation.tsx +11 -6
  64. package/javascript/components/RasterDemSource.tsx +5 -0
  65. package/javascript/components/RasterLayer.tsx +6 -1
  66. package/javascript/components/RasterSource.tsx +5 -0
  67. package/javascript/components/ShapeSource.tsx +6 -1
  68. package/javascript/components/SkyLayer.tsx +5 -0
  69. package/javascript/components/{Style.js → Style.tsx} +117 -35
  70. package/javascript/components/SymbolLayer.tsx +6 -1
  71. package/javascript/components/Terrain.tsx +8 -7
  72. package/javascript/components/{UserLocation.js → UserLocation.tsx} +106 -95
  73. package/javascript/components/VectorSource.tsx +6 -1
  74. package/javascript/index.ts +4 -0
  75. package/javascript/modules/offline/offlineManager.ts +5 -1
  76. package/javascript/modules/snapshot/snapshotManager.ts +1 -0
  77. package/javascript/types/BaseProps.ts +1 -0
  78. package/javascript/types/Position.ts +1 -0
  79. package/javascript/utils/Logger.ts +1 -1
  80. package/javascript/utils/geoUtils.ts +0 -35
  81. package/javascript/utils/index.ts +0 -8
  82. package/javascript/utils/styleMap.ts +0 -1598
  83. package/lib/commonjs/MGLModule.js +37 -0
  84. package/lib/commonjs/MGLModule.js.map +1 -0
  85. package/lib/commonjs/Mapbox.js +379 -0
  86. package/lib/commonjs/Mapbox.js.map +1 -0
  87. package/lib/commonjs/classes/index.d.js +2 -0
  88. package/lib/commonjs/classes/index.d.js.map +1 -1
  89. package/lib/commonjs/components/AbstractLayer.js +1 -2
  90. package/lib/commonjs/components/AbstractLayer.js.map +1 -1
  91. package/lib/commonjs/components/{annotations/Annotation.js → Annotation.js} +26 -27
  92. package/lib/commonjs/components/Annotation.js.map +1 -0
  93. package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
  94. package/lib/commonjs/components/Callout.js +7 -33
  95. package/lib/commonjs/components/Callout.js.map +1 -1
  96. package/lib/commonjs/components/CircleLayer.js.map +1 -1
  97. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
  98. package/lib/commonjs/components/FillLayer.js.map +1 -1
  99. package/lib/commonjs/components/HeadingIndicator.js +12 -3
  100. package/lib/commonjs/components/HeadingIndicator.js.map +1 -1
  101. package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
  102. package/lib/commonjs/components/ImageSource.js.map +1 -1
  103. package/lib/commonjs/components/Images.js +17 -1
  104. package/lib/commonjs/components/Images.js.map +1 -1
  105. package/lib/commonjs/components/LineLayer.js.map +1 -1
  106. package/lib/commonjs/components/MapView.js.map +1 -1
  107. package/lib/commonjs/components/MarkerView.js.map +1 -1
  108. package/lib/commonjs/components/PointAnnotation.js.map +1 -1
  109. package/lib/commonjs/components/RasterDemSource.js.map +1 -1
  110. package/lib/commonjs/components/RasterLayer.js.map +1 -1
  111. package/lib/commonjs/components/RasterSource.js.map +1 -1
  112. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  113. package/lib/commonjs/components/SkyLayer.js.map +1 -1
  114. package/lib/commonjs/components/Style.js +11 -15
  115. package/lib/commonjs/components/Style.js.map +1 -1
  116. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  117. package/lib/commonjs/components/Terrain.js.map +1 -1
  118. package/lib/commonjs/components/UserLocation.js +28 -78
  119. package/lib/commonjs/components/UserLocation.js.map +1 -1
  120. package/lib/commonjs/components/VectorSource.js.map +1 -1
  121. package/lib/commonjs/index.js +16 -339
  122. package/lib/commonjs/index.js.map +1 -1
  123. package/lib/commonjs/modules/offline/offlineManager.js +6 -0
  124. package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
  125. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -1
  126. package/lib/commonjs/types/Position.js +2 -0
  127. package/lib/commonjs/types/Position.js.map +1 -0
  128. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  129. package/lib/commonjs/utils/geoUtils.js +1 -19
  130. package/lib/commonjs/utils/geoUtils.js.map +1 -1
  131. package/lib/commonjs/utils/index.js +0 -16
  132. package/lib/commonjs/utils/index.js.map +1 -1
  133. package/lib/commonjs/utils/styleMap.js +1 -1217
  134. package/lib/commonjs/utils/styleMap.js.map +1 -1
  135. package/lib/module/MGLModule.js +19 -0
  136. package/lib/module/MGLModule.js.map +1 -0
  137. package/lib/module/Mapbox.js +59 -0
  138. package/lib/module/Mapbox.js.map +1 -0
  139. package/lib/module/classes/index.d.js +2 -0
  140. package/lib/module/classes/index.d.js.map +1 -1
  141. package/lib/module/components/AbstractLayer.js +1 -1
  142. package/lib/module/components/AbstractLayer.js.map +1 -1
  143. package/lib/module/components/{annotations/Annotation.js → Annotation.js} +26 -27
  144. package/lib/module/components/Annotation.js.map +1 -0
  145. package/lib/module/components/BackgroundLayer.js.map +1 -1
  146. package/lib/module/components/Callout.js +7 -33
  147. package/lib/module/components/Callout.js.map +1 -1
  148. package/lib/module/components/CircleLayer.js.map +1 -1
  149. package/lib/module/components/FillExtrusionLayer.js.map +1 -1
  150. package/lib/module/components/FillLayer.js.map +1 -1
  151. package/lib/module/components/HeadingIndicator.js +12 -3
  152. package/lib/module/components/HeadingIndicator.js.map +1 -1
  153. package/lib/module/components/HeatmapLayer.js.map +1 -1
  154. package/lib/module/components/ImageSource.js.map +1 -1
  155. package/lib/module/components/Images.js +17 -1
  156. package/lib/module/components/Images.js.map +1 -1
  157. package/lib/module/components/LineLayer.js.map +1 -1
  158. package/lib/module/components/MapView.js.map +1 -1
  159. package/lib/module/components/MarkerView.js.map +1 -1
  160. package/lib/module/components/PointAnnotation.js.map +1 -1
  161. package/lib/module/components/RasterDemSource.js.map +1 -1
  162. package/lib/module/components/RasterLayer.js.map +1 -1
  163. package/lib/module/components/RasterSource.js.map +1 -1
  164. package/lib/module/components/ShapeSource.js.map +1 -1
  165. package/lib/module/components/SkyLayer.js.map +1 -1
  166. package/lib/module/components/Style.js +11 -15
  167. package/lib/module/components/Style.js.map +1 -1
  168. package/lib/module/components/SymbolLayer.js.map +1 -1
  169. package/lib/module/components/Terrain.js.map +1 -1
  170. package/lib/module/components/UserLocation.js +27 -77
  171. package/lib/module/components/UserLocation.js.map +1 -1
  172. package/lib/module/components/VectorSource.js.map +1 -1
  173. package/lib/module/index.js +3 -108
  174. package/lib/module/index.js.map +1 -1
  175. package/lib/module/modules/offline/offlineManager.js +1 -0
  176. package/lib/module/modules/offline/offlineManager.js.map +1 -1
  177. package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
  178. package/lib/module/types/Position.js +2 -0
  179. package/lib/module/types/Position.js.map +1 -0
  180. package/lib/module/utils/animated/Animated.js.map +1 -1
  181. package/lib/module/utils/geoUtils.js +0 -16
  182. package/lib/module/utils/geoUtils.js.map +1 -1
  183. package/lib/module/utils/index.js +0 -14
  184. package/lib/module/utils/index.js.map +1 -1
  185. package/lib/module/utils/styleMap.js +0 -1201
  186. package/lib/module/utils/styleMap.js.map +1 -1
  187. package/lib/typescript/MGLModule.d.ts +22 -0
  188. package/lib/typescript/MGLModule.d.ts.map +1 -0
  189. package/lib/typescript/Mapbox.d.ts +54 -0
  190. package/lib/typescript/Mapbox.d.ts.map +1 -0
  191. package/lib/typescript/components/AbstractLayer.d.ts +1 -0
  192. package/lib/typescript/components/AbstractLayer.d.ts.map +1 -1
  193. package/lib/typescript/components/Annotation.d.ts +34 -0
  194. package/lib/typescript/components/Annotation.d.ts.map +1 -0
  195. package/lib/typescript/components/BackgroundLayer.d.ts +5 -1
  196. package/lib/typescript/components/BackgroundLayer.d.ts.map +1 -1
  197. package/lib/typescript/components/Callout.d.ts +41 -0
  198. package/lib/typescript/components/Callout.d.ts.map +1 -0
  199. package/lib/typescript/components/CircleLayer.d.ts +4 -0
  200. package/lib/typescript/components/CircleLayer.d.ts.map +1 -1
  201. package/lib/typescript/components/FillExtrusionLayer.d.ts +5 -1
  202. package/lib/typescript/components/FillExtrusionLayer.d.ts.map +1 -1
  203. package/lib/typescript/components/FillLayer.d.ts +4 -0
  204. package/lib/typescript/components/FillLayer.d.ts.map +1 -1
  205. package/lib/typescript/components/HeadingIndicator.d.ts +2 -1
  206. package/lib/typescript/components/HeadingIndicator.d.ts.map +1 -1
  207. package/lib/typescript/components/HeatmapLayer.d.ts +5 -1
  208. package/lib/typescript/components/HeatmapLayer.d.ts.map +1 -1
  209. package/lib/typescript/components/ImageSource.d.ts +5 -1
  210. package/lib/typescript/components/ImageSource.d.ts.map +1 -1
  211. package/lib/typescript/components/Images.d.ts +24 -2
  212. package/lib/typescript/components/Images.d.ts.map +1 -1
  213. package/lib/typescript/components/LineLayer.d.ts +4 -0
  214. package/lib/typescript/components/LineLayer.d.ts.map +1 -1
  215. package/lib/typescript/components/MapView.d.ts +2 -5
  216. package/lib/typescript/components/MapView.d.ts.map +1 -1
  217. package/lib/typescript/components/MarkerView.d.ts +3 -2
  218. package/lib/typescript/components/MarkerView.d.ts.map +1 -1
  219. package/lib/typescript/components/PointAnnotation.d.ts +8 -6
  220. package/lib/typescript/components/PointAnnotation.d.ts.map +1 -1
  221. package/lib/typescript/components/RasterDemSource.d.ts +4 -0
  222. package/lib/typescript/components/RasterDemSource.d.ts.map +1 -1
  223. package/lib/typescript/components/RasterLayer.d.ts +5 -1
  224. package/lib/typescript/components/RasterLayer.d.ts.map +1 -1
  225. package/lib/typescript/components/RasterSource.d.ts +4 -0
  226. package/lib/typescript/components/RasterSource.d.ts.map +1 -1
  227. package/lib/typescript/components/ShapeSource.d.ts +5 -1
  228. package/lib/typescript/components/ShapeSource.d.ts.map +1 -1
  229. package/lib/typescript/components/SkyLayer.d.ts +4 -0
  230. package/lib/typescript/components/SkyLayer.d.ts.map +1 -1
  231. package/lib/typescript/components/Style.d.ts +74 -0
  232. package/lib/typescript/components/Style.d.ts.map +1 -0
  233. package/lib/typescript/components/SymbolLayer.d.ts +5 -1
  234. package/lib/typescript/components/SymbolLayer.d.ts.map +1 -1
  235. package/lib/typescript/components/Terrain.d.ts +2 -2
  236. package/lib/typescript/components/Terrain.d.ts.map +1 -1
  237. package/lib/typescript/components/UserLocation.d.ts +102 -0
  238. package/lib/typescript/components/UserLocation.d.ts.map +1 -0
  239. package/lib/typescript/components/VectorSource.d.ts +5 -1
  240. package/lib/typescript/components/VectorSource.d.ts.map +1 -1
  241. package/lib/typescript/index.d.ts +4 -0
  242. package/lib/typescript/index.d.ts.map +1 -0
  243. package/lib/typescript/modules/offline/offlineManager.d.ts +2 -1
  244. package/lib/typescript/modules/offline/offlineManager.d.ts.map +1 -1
  245. package/lib/typescript/modules/snapshot/snapshotManager.d.ts +1 -0
  246. package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +1 -1
  247. package/lib/typescript/types/BaseProps.d.ts +1 -0
  248. package/lib/typescript/types/BaseProps.d.ts.map +1 -1
  249. package/lib/typescript/types/Position.d.ts +2 -0
  250. package/lib/typescript/types/Position.d.ts.map +1 -0
  251. package/lib/typescript/utils/Logger.d.ts +1 -1
  252. package/lib/typescript/utils/Logger.d.ts.map +1 -1
  253. package/lib/typescript/utils/animated/Animated.d.ts +23 -0
  254. package/lib/typescript/utils/animated/Animated.d.ts.map +1 -0
  255. package/lib/typescript/utils/geoUtils.d.ts +0 -8
  256. package/lib/typescript/utils/geoUtils.d.ts.map +1 -1
  257. package/lib/typescript/utils/index.d.ts +0 -14
  258. package/lib/typescript/utils/index.d.ts.map +1 -1
  259. package/lib/typescript/utils/styleMap.d.ts +0 -1406
  260. package/lib/typescript/utils/styleMap.d.ts.map +1 -1
  261. package/package.json +35 -39
  262. package/plugin/build/withMapbox.d.ts +10 -6
  263. package/plugin/build/withMapbox.js +119 -137
  264. package/plugin/install.md +21 -0
  265. package/plugin/src/withMapbox.ts +166 -138
  266. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.java +0 -23
  267. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.java +0 -60
  268. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayer.java +0 -53
  269. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayerManager.java +0 -73
  270. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayer.java +0 -51
  271. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayerManager.java +0 -76
  272. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayer.java +0 -51
  273. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayerManager.java +0 -77
  274. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayer.java +0 -51
  275. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayerManager.java +0 -73
  276. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayer.java +0 -51
  277. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayerManager.java +0 -75
  278. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayer.java +0 -24
  279. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayerManager.java +0 -60
  280. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSkyLayerManager.java +0 -73
  281. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayer.java +0 -51
  282. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayerManager.java +0 -71
  283. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSource.java +0 -76
  284. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.java +0 -68
  285. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSource.java +0 -122
  286. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSourceManager.java +0 -64
  287. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSource.java +0 -43
  288. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSourceManager.java +0 -39
  289. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSource.java +0 -103
  290. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.java +0 -80
  291. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSource.java +0 -100
  292. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSourceManager.java +0 -80
  293. package/index.d.ts +0 -516
  294. package/javascript/components/annotations/Annotation.js +0 -122
  295. package/javascript/index.js +0 -162
  296. package/lib/commonjs/components/annotations/Annotation.js.map +0 -1
  297. package/lib/module/components/annotations/Annotation.js.map +0 -1
  298. /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  import React, { useMemo, useState, useEffect } from 'react';
2
- import PropTypes from 'prop-types';
2
+
3
+ import { FilterExpression } from '../utils/MapboxStyles';
3
4
 
4
5
  import CircleLayer from './CircleLayer';
5
6
  import RasterLayer from './RasterLayer';
@@ -14,7 +15,7 @@ import RasterSource from './RasterSource';
14
15
  import ImageSource from './ImageSource';
15
16
  import { ShapeSource } from './ShapeSource';
16
17
 
17
- function toCamelCase(s) {
18
+ function toCamelCase(s: string): string {
18
19
  return s.replace(/([-_][a-z])/gi, ($1) => {
19
20
  return $1.toUpperCase().replace('-', '').replace('_', '');
20
21
  });
@@ -22,11 +23,13 @@ function toCamelCase(s) {
22
23
 
23
24
  // Patches the Mapbox Style Specification keys into the style props attributes:
24
25
  // icon-allow-overlap -> iconAllowOverlap
25
- function toCamelCaseKeys(oldObj) {
26
+ function toCamelCaseKeys(oldObj?: { [key: string]: unknown }): {
27
+ [key: string]: unknown;
28
+ } {
26
29
  if (!oldObj) {
27
30
  return {};
28
31
  }
29
- const newObj = {};
32
+ const newObj: { [key: string]: unknown } = {};
30
33
  Object.keys(oldObj).forEach((key) => {
31
34
  const value = oldObj[key];
32
35
  if (key.includes('-')) {
@@ -38,7 +41,7 @@ function toCamelCaseKeys(oldObj) {
38
41
  return newObj;
39
42
  }
40
43
 
41
- function getLayerComponentType(layer) {
44
+ function getLayerComponentType(layer: { type: string }) {
42
45
  const { type } = layer;
43
46
 
44
47
  switch (type) {
@@ -65,8 +68,10 @@ function getLayerComponentType(layer) {
65
68
  return null;
66
69
  }
67
70
 
68
- function asLayerComponent(layer) {
69
- const LayerComponent = getLayerComponentType(layer);
71
+ function asLayerComponent(layer: MapboxJSONLayer) {
72
+ type GenericProps = { key?: string; id: string };
73
+ const LayerComponent: typeof React.PureComponent<GenericProps> | null =
74
+ getLayerComponentType(layer) as typeof React.PureComponent<GenericProps>;
70
75
  if (!LayerComponent) {
71
76
  return null;
72
77
  }
@@ -76,7 +81,14 @@ function asLayerComponent(layer) {
76
81
  ...toCamelCaseKeys(layer.layout),
77
82
  };
78
83
 
79
- const layerProps = {};
84
+ const layerProps: {
85
+ sourceID?: string;
86
+ sourceLayerID?: string;
87
+ minZoomLevel?: number;
88
+ maxZoomLevel?: number;
89
+ filter?: FilterExpression;
90
+ style?: object;
91
+ } = {};
80
92
 
81
93
  if (layer.source) {
82
94
  layerProps.sourceID = layer.source;
@@ -100,8 +112,17 @@ function asLayerComponent(layer) {
100
112
  return <LayerComponent key={layer.id} id={layer.id} {...layerProps} />;
101
113
  }
102
114
 
103
- function getTileSourceProps(source) {
104
- const sourceProps = {};
115
+ type SourceProps = {
116
+ url?: string;
117
+ tileUrlTemplates?: string[];
118
+ minZoomLevel?: number;
119
+ maxZoomLevel?: number;
120
+ attribution?: string;
121
+ tms?: boolean;
122
+ };
123
+
124
+ function getTileSourceProps(source: MapboxJSONSource): SourceProps {
125
+ const sourceProps: SourceProps = {};
105
126
  if (source.url) {
106
127
  sourceProps.url = source.url;
107
128
  }
@@ -123,20 +144,22 @@ function getTileSourceProps(source) {
123
144
  return sourceProps;
124
145
  }
125
146
 
126
- function getVectorSource(id, source) {
147
+ function getVectorSource(id: string, source: MapboxJSONSource) {
127
148
  const sourceProps = { ...getTileSourceProps(source) };
128
149
  return <VectorSource key={id} id={id} {...sourceProps} />;
129
150
  }
130
151
 
131
- function getRasterSource(id, source) {
132
- const sourceProps = { ...getTileSourceProps(source) };
152
+ function getRasterSource(id: string, source: MapboxJSONSource) {
153
+ const sourceProps: { tileSize?: number } & SourceProps = {
154
+ ...getTileSourceProps(source),
155
+ };
133
156
  if (source.tileSize) {
134
157
  sourceProps.tileSize = source.tileSize;
135
158
  }
136
159
  return <RasterSource key={id} id={id} {...sourceProps} />;
137
160
  }
138
161
 
139
- function getImageSource(id, source) {
162
+ function getImageSource(id: string, source: MapboxJSONSource) {
140
163
  const sourceProps = {
141
164
  url: source.url,
142
165
  coordinates: source.coordinates,
@@ -144,12 +167,24 @@ function getImageSource(id, source) {
144
167
  return <ImageSource key={id} id={id} {...sourceProps} />;
145
168
  }
146
169
 
147
- function getShapeSource(id, source) {
148
- const sourceProps = {};
170
+ type ShapeShourceShape = typeof ShapeSource.prototype.props['shape'];
171
+
172
+ function getShapeSource(id: string, source: MapboxJSONSource) {
173
+ const sourceProps: {
174
+ url?: string;
175
+ shape?: ShapeShourceShape;
176
+ cluster?: boolean;
177
+ clusterRadius?: number;
178
+ clusterMaxZoomLevel?: number;
179
+ clusterProperties?: object;
180
+ buffer?: number;
181
+ tolerance?: number;
182
+ lineMetrics?: boolean;
183
+ } & SourceProps = {};
149
184
  if (source.data && typeof source.data === 'string') {
150
185
  sourceProps.url = source.data;
151
186
  } else if (source.data && typeof source.data === 'object') {
152
- sourceProps.shape = source.data;
187
+ sourceProps.shape = source.data as ShapeShourceShape;
153
188
  }
154
189
  if (source.cluster !== undefined) {
155
190
  sourceProps.cluster = source.cluster;
@@ -178,7 +213,7 @@ function getShapeSource(id, source) {
178
213
  return <ShapeSource key={id} id={id} {...sourceProps} />;
179
214
  }
180
215
 
181
- function asSourceComponent(id, source) {
216
+ function asSourceComponent(id: string, source: MapboxJSONSource) {
182
217
  switch (source.type) {
183
218
  case 'vector':
184
219
  return getVectorSource(id, source);
@@ -195,26 +230,79 @@ function asSourceComponent(id, source) {
195
230
  return null;
196
231
  }
197
232
 
233
+ type MapboxJSONLayer = {
234
+ type: string;
235
+ id: string;
236
+ paint?: { [k: string]: unknown };
237
+ layout?: { [k: string]: unknown };
238
+ source?: string;
239
+ minzoom?: number;
240
+ maxzoom?: number;
241
+ filter?: FilterExpression;
242
+ style?: object;
243
+ ['source-layer']: string;
244
+ };
245
+
246
+ type MapboxJSONSource = {
247
+ type: string;
248
+ url?: string;
249
+ tiles?: string[];
250
+ minzoom?: number;
251
+ maxzoom?: number;
252
+ attribution?: string;
253
+ scheme?: string;
254
+ tileSize?: number;
255
+ coordinates?: [
256
+ [number, number],
257
+ [number, number],
258
+ [number, number],
259
+ [number, number],
260
+ ];
261
+ data?: string | object;
262
+
263
+ buffer: number;
264
+ cluster?: boolean;
265
+ clusterRadius?: number;
266
+ clusterMaxZoom?: number;
267
+ clusterProperties?: object;
268
+ tolerance?: number;
269
+ lineMetrics?: boolean;
270
+ };
271
+
272
+ type MapboxJSON = {
273
+ layers?: MapboxJSONLayer[];
274
+ sources?: { [key: string]: MapboxJSONSource };
275
+ };
276
+
277
+ type Props = {
278
+ /**
279
+ * A JSON object conforming to the schema described in the Mapbox Style Specification , or a URL to such JSON.
280
+ */
281
+ json: MapboxJSON | URL;
282
+ };
283
+
198
284
  /**
199
285
  * Style is a component that automatically adds sources / layers to the map using Mapbox GL Style Spec.
200
286
  * Only [`sources`](https://docs.mapbox.com/mapbox-gl-js/style-spec/sources) & [`layers`](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/) are supported.
201
287
  * Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/rnmapbox/maps/tree/main/docs.
202
288
  */
203
- const Style = (props) => {
289
+ const Style = (props: Props) => {
204
290
  const [fetchedJson, setFetchedJson] = useState({});
205
- const json = typeof props.json === 'object' ? props.json : fetchedJson;
291
+ const json: MapboxJSON =
292
+ typeof props.json === 'object' ? props.json : fetchedJson;
206
293
 
207
294
  // Fetch style when props.json is a URL
208
295
  useEffect(() => {
209
296
  const abortController = new AbortController();
210
- const fetchStyleJson = async () => {
297
+ const fetchStyleJson = async (json: string) => {
211
298
  try {
212
- const response = await fetch(props.json, {
299
+ const response = await fetch(json, {
213
300
  signal: abortController.signal,
214
301
  });
215
302
  const responseJson = await response.json();
216
303
  setFetchedJson(responseJson);
217
- } catch (e) {
304
+ } catch (error: unknown) {
305
+ const e = error as { name?: string };
218
306
  if (e.name === 'AbortError') {
219
307
  return;
220
308
  }
@@ -222,7 +310,7 @@ const Style = (props) => {
222
310
  }
223
311
  };
224
312
  if (typeof props.json === 'string') {
225
- fetchStyleJson();
313
+ fetchStyleJson(props.json);
226
314
  }
227
315
  return function cleanup() {
228
316
  abortController.abort();
@@ -238,14 +326,15 @@ const Style = (props) => {
238
326
  }, [json.layers]);
239
327
 
240
328
  // Extract source components from json
329
+ const { sources } = json;
241
330
  const sourceComponents = useMemo(() => {
242
- if (!json.sources || !Object.keys(json.sources)) {
331
+ if (!sources || !Object.keys(sources)) {
243
332
  return [];
244
333
  }
245
- return Object.keys(json.sources)
246
- .map((id) => asSourceComponent(id, json.sources[id]))
334
+ return Object.keys(sources)
335
+ .map((id) => asSourceComponent(id, sources[id]))
247
336
  .filter((x) => !!x);
248
- }, [json.sources]);
337
+ }, [sources]);
249
338
 
250
339
  return (
251
340
  <>
@@ -255,11 +344,4 @@ const Style = (props) => {
255
344
  );
256
345
  };
257
346
 
258
- Style.propTypes = {
259
- /**
260
- * A JSON object conforming to the schema described in the Mapbox Style Specification , or a URL to such JSON.
261
- */
262
- json: PropTypes.any,
263
- };
264
-
265
347
  export default Style;
@@ -12,10 +12,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLSymbolLayer';
12
12
 
13
13
  export type Props = {
14
14
  /**
15
- * A string that uniquely identifies the source in the style to which it is added.
15
+ * A string that uniquely identifies the layer in the style to which it is added.
16
16
  */
17
17
  id: string;
18
18
 
19
+ /**
20
+ * The id refers to en existing layer in the style. Does not create a new layer.
21
+ */
22
+ existing?: boolean;
23
+
19
24
  /**
20
25
  * The source from which to obtain the data to style.
21
26
  * If the source has not yet been added to the current style, the behavior is undefined.
@@ -11,7 +11,7 @@ type Props = BaseProps & {
11
11
  /**
12
12
  * Name of a source of raster_dem type to be used for terrain elevation.
13
13
  */
14
- sourceID: string;
14
+ sourceID?: string;
15
15
 
16
16
  /**
17
17
  * Deprecated, use exaggeration in style instead
@@ -21,7 +21,11 @@ type Props = BaseProps & {
21
21
  /**
22
22
  * Customizable style attributes
23
23
  */
24
- style: TerrainLayerStyleProps;
24
+ style?: TerrainLayerStyleProps;
25
+ };
26
+
27
+ type NativeProps = Omit<Props, 'style'> & {
28
+ reactStyle?: { [key: string]: StyleValue };
25
29
  };
26
30
 
27
31
  export const Terrain = memo((props: Props) => {
@@ -46,8 +50,5 @@ export const Terrain = memo((props: Props) => {
46
50
  return <RCTMGLTerrain {...baseProps} />;
47
51
  });
48
52
 
49
- const RCTMGLTerrain: HostComponent<{
50
- sourceID: string;
51
- reactStyle?: { [key: string]: StyleValue };
52
- style?: undefined;
53
- }> = requireNativeComponent(NATIVE_MODULE_NAME);
53
+ const RCTMGLTerrain: HostComponent<NativeProps> =
54
+ requireNativeComponent(NATIVE_MODULE_NAME);
@@ -1,18 +1,19 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
1
+ import React, { ReactElement } from 'react';
3
2
 
4
3
  import locationManager from '../modules/location/locationManager';
4
+ import { type Location } from '../modules/location/locationManager';
5
+ import { CircleLayerStyle } from '../Mapbox';
5
6
 
6
- import Annotation from './annotations/Annotation';
7
+ import Annotation from './Annotation';
7
8
  import CircleLayer from './CircleLayer';
8
9
  import HeadingIndicator from './HeadingIndicator';
9
10
  import NativeUserLocation from './NativeUserLocation';
10
11
 
11
12
  const mapboxBlue = 'rgba(51, 181, 229, 100)';
12
13
 
13
- const layerStyles = {
14
+ const layerStyles: Record<'normal', Record<string, CircleLayerStyle>> = {
14
15
  normal: {
15
- pluse: {
16
+ pulse: {
16
17
  circleRadius: 15,
17
18
  circleColor: mapboxBlue,
18
19
  circleOpacity: 0.2,
@@ -31,11 +32,14 @@ const layerStyles = {
31
32
  },
32
33
  };
33
34
 
34
- export const normalIcon = (showsUserHeadingIndicator, heading) => [
35
+ const normalIcon = (
36
+ showsUserHeadingIndicator?: boolean,
37
+ heading?: number | null,
38
+ ): ReactElement[] => [
35
39
  <CircleLayer
36
- key="mapboxUserLocationPluseCircle"
37
- id="mapboxUserLocationPluseCircle"
38
- style={layerStyles.normal.pluse}
40
+ key="mapboxUserLocationPulseCircle"
41
+ id="mapboxUserLocationPulseCircle"
42
+ style={layerStyles.normal.pulse}
39
43
  />,
40
44
  <CircleLayer
41
45
  key="mapboxUserLocationWhiteCircle"
@@ -43,93 +47,98 @@ export const normalIcon = (showsUserHeadingIndicator, heading) => [
43
47
  style={layerStyles.normal.background}
44
48
  />,
45
49
  <CircleLayer
46
- key="mapboxUserLocationBlueCicle"
47
- id="mapboxUserLocationBlueCicle"
50
+ key="mapboxUserLocationBlueCircle"
51
+ id="mapboxUserLocationBlueCircle"
48
52
  aboveLayerID="mapboxUserLocationWhiteCircle"
49
53
  style={layerStyles.normal.foreground}
50
54
  />,
51
- ...(showsUserHeadingIndicator && heading !== null
52
- ? [HeadingIndicator({ heading })]
55
+ ...(showsUserHeadingIndicator && typeof heading === 'number'
56
+ ? [HeadingIndicator({ heading, key: 'mapboxUserLocationHeadingIndicator' })]
53
57
  : []),
54
58
  ];
55
59
 
56
- class UserLocation extends React.Component {
57
- static propTypes = {
58
- /**
59
- * Whether location icon is animated between updates
60
- */
61
- animated: PropTypes.bool,
62
-
63
- /**
64
- * Which render mode to use.
65
- * Can either be `normal` or `native`
66
- */
67
- renderMode: PropTypes.oneOf(['normal', 'native']),
68
-
69
- /**
70
- * native/android only render mode
71
- *
72
- * - normal: just a circle
73
- * - compass: triangle with heading
74
- * - gps: large arrow
75
- *
76
- * @platform android
77
- */
78
- androidRenderMode: PropTypes.oneOf(['normal', 'compass', 'gps']),
79
-
80
- /**
81
- * Whether location icon is visible
82
- */
83
- visible: PropTypes.bool,
84
-
85
- /**
86
- * Callback that is triggered on location icon press
87
- */
88
- onPress: PropTypes.func,
89
-
90
- /**
91
- * Callback that is triggered on location update
92
- */
93
- onUpdate: PropTypes.func,
94
-
95
- /**
96
- * Show or hide small arrow which indicates direction the device is pointing relative to north.
97
- */
98
- showsUserHeadingIndicator: PropTypes.bool,
99
-
100
- /**
101
- * Request the always location permission, and listen to the location even when the app is in background
102
- *
103
- * @platform ios
104
- */
105
- requestsAlwaysUse: PropTypes.bool,
106
-
107
- /**
108
- * Minimum amount of movement before GPS location is updated in meters
109
- */
110
- minDisplacement: PropTypes.number,
111
-
112
- /**
113
- * Custom location icon of type mapbox-gl-native components
114
- */
115
- children: PropTypes.any,
116
- };
60
+ export enum UserLocationRenderMode {
61
+ Native = 'native',
62
+ Normal = 'normal',
63
+ }
64
+
65
+ type Props = {
66
+ /**
67
+ * native/android only render mode
68
+ *
69
+ * - normal: just a circle
70
+ * - compass: triangle with heading
71
+ * - gps: large arrow
72
+ *
73
+ * @platform android
74
+ */
75
+ androidRenderMode?: 'normal' | 'compass' | 'gps';
76
+
77
+ /**
78
+ * Whether location icon is animated between updates
79
+ */
80
+ animated?: boolean;
81
+
82
+ /**
83
+ * Custom location icon of type mapbox-gl-native components
84
+ */
85
+ children?: ReactElement;
86
+
87
+ /**
88
+ * Minimum amount of movement before GPS location is updated in meters
89
+ */
90
+ minDisplacement?: number;
91
+
92
+ /**
93
+ * Callback that is triggered on location icon press
94
+ */
95
+ onPress?: () => void;
96
+
97
+ /**
98
+ * Callback that is triggered on location update
99
+ */
100
+ onUpdate?: (location: Location) => void;
101
+
102
+ /**
103
+ * Which render mode to use.
104
+ */
105
+ renderMode?: UserLocationRenderMode;
106
+
107
+ /**
108
+ * Request the always location permission, and listen to the location even when the app is in background
109
+ *
110
+ * @platform ios
111
+ */
112
+ requestsAlwaysUse?: boolean;
113
+
114
+ /**
115
+ * Show or hide small arrow which indicates direction the device is pointing relative to north.
116
+ */
117
+ showsUserHeadingIndicator?: boolean;
117
118
 
119
+ /**
120
+ * Whether location icon is visible
121
+ */
122
+ visible?: boolean;
123
+ };
124
+
125
+ type UserLocationState = {
126
+ shouldShowUserLocation: false;
127
+ coordinates: number[] | null;
128
+ heading: number | null;
129
+ };
130
+
131
+ class UserLocation extends React.Component<Props, UserLocationState> {
118
132
  static defaultProps = {
119
133
  animated: true,
120
134
  visible: true,
121
135
  showsUserHeadingIndicator: false,
122
136
  requestsAlwaysUse: false,
123
137
  minDisplacement: 0,
124
- renderMode: 'normal',
125
- };
126
-
127
- static RenderMode = {
128
- Native: 'native',
129
- Normal: 'normal',
138
+ renderMode: UserLocationRenderMode.Normal,
130
139
  };
131
140
 
132
- constructor(props) {
141
+ constructor(props: Props) {
133
142
  super(props);
134
143
 
135
144
  this.state = {
@@ -143,34 +152,36 @@ class UserLocation extends React.Component {
143
152
 
144
153
  // required as #setLocationManager attempts to setState
145
154
  // after component unmount
146
- _isMounted = null;
155
+ _isMounted?: boolean = undefined;
147
156
 
148
- locationManagerRunning = false;
157
+ locationManagerRunning?: boolean = false;
149
158
 
150
159
  async componentDidMount() {
151
160
  this._isMounted = true;
152
161
 
153
- locationManager.setMinDisplacement(this.props.minDisplacement);
162
+ locationManager.setMinDisplacement(this.props.minDisplacement || 0);
154
163
 
155
164
  await this.setLocationManager({
156
165
  running: this.needsLocationManagerRunning(),
157
166
  });
158
167
 
159
- if (this.renderMode === UserLocation.RenderMode.Native) {
168
+ if (this.props.renderMode === UserLocationRenderMode.Native) {
160
169
  return;
161
170
  }
162
171
  }
163
172
 
164
- async componentDidUpdate(prevProps) {
173
+ async componentDidUpdate(prevProps: Props) {
165
174
  await this.setLocationManager({
166
175
  running: this.needsLocationManagerRunning(),
167
176
  });
168
177
 
169
178
  if (this.props.minDisplacement !== prevProps.minDisplacement) {
170
- locationManager.setMinDisplacement(this.props.minDisplacement);
179
+ locationManager.setMinDisplacement(this.props.minDisplacement || 0);
171
180
  }
172
181
  if (this.props.requestsAlwaysUse !== prevProps.requestsAlwaysUse) {
173
- locationManager.setRequestsAlwaysUse(this.props.requestsAlwaysUse);
182
+ locationManager.setRequestsAlwaysUse(
183
+ this.props.requestsAlwaysUse || false,
184
+ );
174
185
  }
175
186
  }
176
187
 
@@ -189,7 +200,7 @@ class UserLocation extends React.Component {
189
200
  * @param {Object} running - Object with key `running` and `boolean` value
190
201
  * @return {Promise<void>}
191
202
  */
192
- async setLocationManager({ running }) {
203
+ async setLocationManager({ running }: { running?: boolean }) {
193
204
  if (this.locationManagerRunning !== running) {
194
205
  this.locationManagerRunning = running;
195
206
  if (running) {
@@ -211,12 +222,12 @@ class UserLocation extends React.Component {
211
222
  needsLocationManagerRunning() {
212
223
  return (
213
224
  !!this.props.onUpdate ||
214
- (this.props.renderMode === UserLocation.RenderMode.Normal &&
225
+ (this.props.renderMode === UserLocationRenderMode.Normal &&
215
226
  this.props.visible)
216
227
  );
217
228
  }
218
229
 
219
- _onLocationUpdate(location) {
230
+ _onLocationUpdate(location: Location | null) {
220
231
  if (!this._isMounted || !location) {
221
232
  return;
222
233
  }
@@ -231,7 +242,7 @@ class UserLocation extends React.Component {
231
242
 
232
243
  this.setState({
233
244
  coordinates,
234
- heading,
245
+ heading: heading ?? null,
235
246
  });
236
247
 
237
248
  if (this.props.onUpdate) {
@@ -242,7 +253,7 @@ class UserLocation extends React.Component {
242
253
  _renderNative() {
243
254
  const { androidRenderMode, showsUserHeadingIndicator } = this.props;
244
255
 
245
- let props = {
256
+ const props = {
246
257
  androidRenderMode,
247
258
  iosShowsUserHeadingIndicator: showsUserHeadingIndicator,
248
259
  };
@@ -258,7 +269,7 @@ class UserLocation extends React.Component {
258
269
  return null;
259
270
  }
260
271
 
261
- if (this.props.renderMode === UserLocation.RenderMode.Native) {
272
+ if (this.props.renderMode === UserLocationRenderMode.Native) {
262
273
  return this._renderNative();
263
274
  }
264
275
 
@@ -268,8 +279,8 @@ class UserLocation extends React.Component {
268
279
 
269
280
  return (
270
281
  <Annotation
271
- animated={animated}
272
282
  id="mapboxUserLocation"
283
+ animated={animated}
273
284
  onPress={onPress}
274
285
  coordinates={coordinates}
275
286
  style={{
@@ -24,6 +24,11 @@ interface Props {
24
24
  */
25
25
  id: string;
26
26
 
27
+ /**
28
+ * The id refers to en existing source in the style. Does not create a new source.
29
+ */
30
+ existing?: boolean;
31
+
27
32
  /**
28
33
  * A URL to a TileJSON configuration file describing the source’s contents and other metadata.
29
34
  */
@@ -85,7 +90,7 @@ interface Props {
85
90
  height: number;
86
91
  };
87
92
 
88
- children: React.ReactElement | React.ReactElement[];
93
+ children?: React.ReactElement | React.ReactElement[];
89
94
  }
90
95
 
91
96
  //interface NativeProps extends Omit<Props, 'children'> {}
@@ -0,0 +1,4 @@
1
+ export * from './Mapbox';
2
+ import * as Mapbox from './Mapbox';
3
+
4
+ export default Mapbox;
@@ -6,8 +6,12 @@ import {
6
6
 
7
7
  import { isUndefined, isFunction, isAndroid } from '../../utils';
8
8
 
9
+ export {
10
+ default as OfflineCreatePackOptions,
11
+ type OfflineCreatePackOptionsArgs,
12
+ } from './OfflineCreatePackOptions';
9
13
  import OfflineCreatePackOptions, {
10
- OfflineCreatePackOptionsArgs,
14
+ type OfflineCreatePackOptionsArgs,
11
15
  } from './OfflineCreatePackOptions';
12
16
  import OfflinePack from './OfflinePack';
13
17