@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,15 +1,15 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
1
+ import React, { ReactNode } from 'react';
3
2
  import {
4
3
  View,
5
4
  Text,
6
5
  Animated,
7
6
  requireNativeComponent,
8
7
  StyleSheet,
8
+ ViewStyle,
9
+ ViewProps,
10
+ StyleProp,
9
11
  } from 'react-native';
10
12
 
11
- import { viewPropTypes } from '../utils';
12
-
13
13
  export const NATIVE_MODULE_NAME = 'RCTMGLCallout';
14
14
 
15
15
  const styles = StyleSheet.create({
@@ -48,60 +48,68 @@ const styles = StyleSheet.create({
48
48
  },
49
49
  });
50
50
 
51
+ type NativeProps = {
52
+ children: ReactNode;
53
+ style: StyleProp<ViewStyle>;
54
+ };
55
+
56
+ type Props = Omit<ViewProps, 'style'> & {
57
+ /**
58
+ * String that gets displayed in the default callout.
59
+ */
60
+ title: string;
61
+
62
+ /**
63
+ * Style property for the Animated.View wrapper, apply animations to this
64
+ */
65
+ style?: ViewStyle;
66
+
67
+ /**
68
+ * Style property for the native RCTMGLCallout container, set at your own risk.
69
+ */
70
+ containerStyle?: ViewStyle;
71
+
72
+ /**
73
+ * Style property for the content bubble.
74
+ */
75
+ contentStyle?: ViewStyle;
76
+
77
+ /**
78
+ * Style property for the triangle tip under the content.
79
+ */
80
+ tipStyle?: ViewStyle;
81
+
82
+ /**
83
+ * Style property for the title in the content bubble.
84
+ */
85
+ textStyle?: ViewStyle;
86
+ };
87
+
51
88
  /**
52
89
  * Callout that displays information about a selected annotation near the annotation.
53
90
  */
54
- class Callout extends React.PureComponent {
55
- static propTypes = {
56
- ...viewPropTypes,
57
-
58
- /**
59
- * String that gets displayed in the default callout.
60
- */
61
- title: PropTypes.string,
62
-
63
- /**
64
- * Style property for the Animated.View wrapper, apply animations to this
65
- */
66
- style: PropTypes.any,
67
-
68
- /**
69
- * Style property for the native RCTMGLCallout container, set at your own risk.
70
- */
71
- containerStyle: PropTypes.any,
72
-
73
- /**
74
- * Style property for the content bubble.
75
- */
76
- contentStyle: PropTypes.any,
77
-
78
- /**
79
- * Style property for the triangle tip under the content.
80
- */
81
- tipStyle: PropTypes.any,
82
-
83
- /**
84
- * Style property for the title in the content bubble.
85
- */
86
- textStyle: PropTypes.any,
87
- };
88
-
91
+ class Callout extends React.PureComponent<Props> {
89
92
  get _containerStyle() {
90
- return [
93
+ const style = [
91
94
  {
92
95
  position: 'absolute',
93
96
  zIndex: 999,
94
97
  backgroundColor: 'transparent',
95
- },
96
- this.props.containerStyle,
98
+ } as ViewStyle,
97
99
  ];
100
+
101
+ if (this.props.containerStyle) {
102
+ style.push(this.props.containerStyle);
103
+ }
104
+
105
+ return style;
98
106
  }
99
107
 
100
108
  get _hasChildren() {
101
109
  return React.Children.count(this.props.children) > 0;
102
110
  }
103
111
 
104
- _renderDefaultCallout() {
112
+ _renderDefaultCallout(): ReactNode {
105
113
  return (
106
114
  <Animated.View style={[styles.container, this.props.style]}>
107
115
  <View style={[styles.content, this.props.contentStyle]}>
@@ -114,7 +122,7 @@ class Callout extends React.PureComponent {
114
122
  );
115
123
  }
116
124
 
117
- _renderCustomCallout() {
125
+ _renderCustomCallout(): ReactNode {
118
126
  return (
119
127
  <Animated.View {...this.props} style={this.props.style}>
120
128
  {this.props.children}
@@ -134,6 +142,6 @@ class Callout extends React.PureComponent {
134
142
  }
135
143
  }
136
144
 
137
- const RCTMGLCallout = requireNativeComponent(NATIVE_MODULE_NAME, Callout);
145
+ const RCTMGLCallout = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
138
146
 
139
147
  export default Callout;
@@ -18,6 +18,11 @@ export type Props = {
18
18
  */
19
19
  id: string;
20
20
 
21
+ /**
22
+ * The id refers to en existing layer in the style. Does not create a new layer.
23
+ */
24
+ existing?: boolean;
25
+
21
26
  /**
22
27
  * The source from which to obtain the data to style.
23
28
  * If the source has not yet been added to the current style, the behavior is undefined.
@@ -15,10 +15,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLFillExtrusionLayer';
15
15
 
16
16
  export type Props = {
17
17
  /**
18
- * A string that uniquely identifies the source in the style to which it is added.
18
+ * A string that uniquely identifies the layer in the style to which it is added.
19
19
  */
20
20
  id: string;
21
21
 
22
+ /**
23
+ * The id refers to en existing layer in the style. Does not create a new layer.
24
+ */
25
+ existing?: boolean;
26
+
22
27
  /**
23
28
  * The source from which to obtain the data to style.
24
29
  * If the source has not yet been added to the current style, the behavior is undefined.
@@ -16,6 +16,11 @@ export type Props = {
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.
@@ -1,30 +1,41 @@
1
1
  import React from 'react';
2
2
 
3
3
  import headingIcon from '../assets/heading.png';
4
+ import { BaseProps } from '../types/BaseProps';
4
5
 
5
6
  import { SymbolLayer } from './SymbolLayer';
7
+ import Images from './Images';
6
8
 
7
9
  const style = {
8
- iconImage: headingIcon,
10
+ iconImage: 'userLocationHeading',
9
11
  iconAllowOverlap: true,
10
12
  iconPitchAlignment: 'map',
11
13
  iconRotationAlignment: 'map',
12
14
  } as const;
13
15
 
14
- type Props = {
16
+ type Props = BaseProps & {
15
17
  heading?: number;
16
18
  };
17
19
 
18
- const HeadingIndicator = ({ heading }: Props) => (
19
- <SymbolLayer
20
- key="mapboxUserLocationHeadingIndicator"
21
- id="mapboxUserLocationHeadingIndicator"
22
- belowLayerID="mapboxUserLocationWhiteCircle"
23
- style={{
24
- iconRotate: heading,
25
- ...style,
26
- }}
27
- />
28
- );
20
+ const HeadingIndicator = ({ heading }: Props) => {
21
+ return (
22
+ <React.Fragment key="mapboxUserLocationHeadingIndicatorWrapper">
23
+ <Images
24
+ images={{ userLocationHeading: headingIcon }}
25
+ key="mapboxUserLocationHeadingImages"
26
+ />
27
+ <SymbolLayer
28
+ key="mapboxUserLocationHeadingIndicator"
29
+ id="mapboxUserLocationHeadingIndicator"
30
+ sourceID="mapboxUserLocation"
31
+ belowLayerID="mapboxUserLocationWhiteCircle"
32
+ style={{
33
+ iconRotate: heading,
34
+ ...style,
35
+ }}
36
+ />
37
+ </React.Fragment>
38
+ );
39
+ };
29
40
 
30
41
  export default HeadingIndicator;
@@ -15,10 +15,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLHeatmapLayer';
15
15
 
16
16
  export type Props = {
17
17
  /**
18
- * A string that uniquely identifies the source in the style to which it is added.
18
+ * A string that uniquely identifies the layer in the style to which it is added.
19
19
  */
20
20
  id: string;
21
21
 
22
+ /**
23
+ * The id refers to en existing layer in the style. Does not create a new layer.
24
+ */
25
+ existing?: boolean;
26
+
22
27
  /**
23
28
  * The source from which to obtain the data to style.
24
29
  * If the source has not yet been added to the current style, the behavior is undefined.
@@ -20,6 +20,11 @@ type Props = BaseProps & {
20
20
  */
21
21
  id: string;
22
22
 
23
+ /**
24
+ * The id refers to en existing source in the style. Does not create a new source.
25
+ */
26
+ existing?: boolean;
27
+
23
28
  /**
24
29
  * An HTTP(S) URL, absolute file URL, or local file URL to the source image.
25
30
  * Gifs are currently not supported.
@@ -29,7 +34,7 @@ type Props = BaseProps & {
29
34
  /**
30
35
  * The top left, top right, bottom right, and bottom left coordinates for the image.
31
36
  */
32
- coordinates: [Position, Position, Position, Position];
37
+ coordinates?: [Position, Position, Position, Position];
33
38
 
34
39
  children?: React.ReactElement | React.ReactElement[];
35
40
  };
@@ -1,5 +1,9 @@
1
1
  import React, { ReactNode, ReactElement } from 'react';
2
- import { requireNativeComponent, Image as RNImage } from 'react-native';
2
+ import {
3
+ requireNativeComponent,
4
+ Image as RNImage,
5
+ ImageURISource,
6
+ } from 'react-native';
3
7
  import { ImageSourcePropType, ImageResolvedAssetSource } from 'react-native';
4
8
 
5
9
  import { ShapeSource } from './ShapeSource';
@@ -12,7 +16,7 @@ export type RNMBEvent<PayloadType = { [key: string]: string }> = {
12
16
  type: string;
13
17
  };
14
18
 
15
- function _isUrlOrPath(value: string | ImageSourcePropType): value is string {
19
+ function _isUrlOrPath(value: ImageEntry): value is string {
16
20
  return (
17
21
  (typeof value === 'string' || value instanceof String) &&
18
22
  (value.startsWith('file://') ||
@@ -24,6 +28,16 @@ function _isUrlOrPath(value: string | ImageSourcePropType): value is string {
24
28
  );
25
29
  }
26
30
 
31
+ function isImageSourcePropType(
32
+ value: ImageEntry,
33
+ ): value is ImageSourcePropType {
34
+ if (typeof value === 'number' || value instanceof Number) {
35
+ return true;
36
+ }
37
+ const valueAsSource = value as ImageURISource;
38
+ return !!valueAsSource.uri && typeof valueAsSource.uri === 'string';
39
+ }
40
+
27
41
  type TypedReactNode<T> = ReactElement<T> | Array<TypedReactNode<T>> | never;
28
42
 
29
43
  type NativeImage =
@@ -33,8 +47,33 @@ type NativeImage =
33
47
  sdf?: boolean;
34
48
  stretchX?: [number, number][];
35
49
  stretchY?: [number, number][];
50
+ content?: [number, number, number, number];
51
+ scale?: number;
36
52
  };
37
53
 
54
+ export type ImageEntryData = {
55
+ url?: string;
56
+ image?: ImageSourcePropType;
57
+ resolvedImage?: ImageResolvedAssetSource;
58
+ sdf?: boolean;
59
+ stretchX?: [number, number][];
60
+ stretchY?: [number, number][];
61
+ content?: [number, number, number, number];
62
+ scale?: number;
63
+ };
64
+
65
+ type ResolvedImageEntryData = {
66
+ url?: string;
67
+ resolvedImage?: ImageResolvedAssetSource;
68
+ sdf?: boolean;
69
+ stretchX?: [number, number][];
70
+ stretchY?: [number, number][];
71
+ content?: [number, number, number, number];
72
+ scale?: number;
73
+ };
74
+
75
+ export type ImageEntry = string | ImageSourcePropType | ImageEntryData;
76
+
38
77
  const isChildAnImage = (
39
78
  child: ReactNode,
40
79
  ): child is React.ReactElement<typeof Image> => {
@@ -47,7 +86,7 @@ interface Props {
47
86
  * Keys are names - see iconImage expressions, values can be either urls-s objects
48
87
  * with format {uri: 'http://...'}` or `require('image.png')` or `import 'image.png'`
49
88
  */
50
- images?: { [key: string]: ImageSourcePropType };
89
+ images?: { [key: string]: ImageEntry };
51
90
 
52
91
  /**
53
92
  * If you have an asset under Image.xcassets on iOS and the drawables directory on android
@@ -77,7 +116,9 @@ class Images extends React.PureComponent<Props> {
77
116
  return {};
78
117
  }
79
118
 
80
- const images: { [key: string]: string | ImageResolvedAssetSource } = {};
119
+ const images: {
120
+ [key: string]: string | ImageResolvedAssetSource | ResolvedImageEntryData;
121
+ } = {};
81
122
  let nativeImages: NativeImage[] = [];
82
123
 
83
124
  if (this.props.images) {
@@ -93,11 +134,20 @@ class Images extends React.PureComponent<Props> {
93
134
  );
94
135
  } else if (_isUrlOrPath(value)) {
95
136
  images[imageName] = value;
96
- } else {
137
+ } else if (isImageSourcePropType(value)) {
97
138
  const res = RNImage.resolveAssetSource(value);
98
139
  if (res && res.uri) {
99
140
  images[imageName] = res;
100
141
  }
142
+ } else {
143
+ let imageEntry = value as ImageEntryData;
144
+ if (imageEntry.image) {
145
+ imageEntry = {
146
+ ...imageEntry,
147
+ resolvedImage: RNImage.resolveAssetSource(imageEntry.image),
148
+ };
149
+ }
150
+ images[imageName] = imageEntry;
101
151
  }
102
152
  }
103
153
  }
@@ -147,7 +197,9 @@ class Images extends React.PureComponent<Props> {
147
197
  type NativeProps = {
148
198
  hasOnImageMissing: boolean;
149
199
  onImageMissing?: (event: React.SyntheticEvent<Element, RNMBEvent>) => void;
150
- images?: { [key: string]: string | ImageResolvedAssetSource };
200
+ images?: {
201
+ [key: string]: string | ImageResolvedAssetSource | ResolvedImageEntryData;
202
+ };
151
203
  nativeImages?: NativeImage[];
152
204
  };
153
205
 
@@ -16,6 +16,11 @@ export type Props = {
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.
@@ -21,6 +21,7 @@ import {
21
21
  import { getFilter } from '../utils/filterUtils';
22
22
  import Logger from '../utils/Logger';
23
23
  import { FilterExpression } from '../utils/MapboxStyles';
24
+ import { type Position } from '../types/Position';
24
25
 
25
26
  import NativeBridgeComponent from './NativeBridgeComponent';
26
27
 
@@ -46,7 +47,6 @@ export type Point = {
46
47
  y: number;
47
48
  };
48
49
 
49
- export type Position = [number, number];
50
50
  type BBox = [number, number, number, number];
51
51
 
52
52
  export type RegionPayload = {
@@ -9,6 +9,7 @@ import {
9
9
 
10
10
  import { toJSONString } from '../utils';
11
11
  import { makePoint } from '../utils/geoUtils';
12
+ import { type Position } from '../types/Position';
12
13
 
13
14
  import PointAnnotation from './PointAnnotation';
14
15
 
@@ -20,7 +21,7 @@ type Props = ViewProps & {
20
21
  /**
21
22
  * The center point (specified as a map coordinate) of the marker.
22
23
  */
23
- coordinate: [number, number];
24
+ coordinate: Position;
24
25
 
25
26
  /**
26
27
  * Any coordinate between (0, 0) and (1, 1), where (0, 0) is the top-left corner of
@@ -78,7 +79,7 @@ class MarkerView extends React.PureComponent<Props> {
78
79
  return this.__idForPointAnnotation;
79
80
  }
80
81
 
81
- _getCoordinate(coordinate: [number, number]): string | undefined {
82
+ _getCoordinate(coordinate: Position): string | undefined {
82
83
  if (!coordinate) {
83
84
  return undefined;
84
85
  }
@@ -5,11 +5,12 @@ import {
5
5
  Platform,
6
6
  type ViewProps,
7
7
  } from 'react-native';
8
- import { type Feature } from 'geojson';
8
+ import { Feature, Point } from 'geojson';
9
9
 
10
10
  import { toJSONString, isFunction } from '../utils';
11
11
  import { makePoint } from '../utils/geoUtils';
12
12
  import { type BaseProps } from '../types/BaseProps';
13
+ import { Position } from '../types/Position';
13
14
 
14
15
  import NativeBridgeComponent, { type RNMBEvent } from './NativeBridgeComponent';
15
16
 
@@ -23,9 +24,13 @@ const styles = StyleSheet.create({
23
24
  },
24
25
  });
25
26
 
26
- type FeaturePayload = {
27
- feature: Feature;
28
- };
27
+ type FeaturePayload = Feature<
28
+ Point,
29
+ {
30
+ screenPointX: number;
31
+ screenPointY: number;
32
+ }
33
+ >;
29
34
 
30
35
  type Props = BaseProps & {
31
36
  /**
@@ -56,7 +61,7 @@ type Props = BaseProps & {
56
61
  /**
57
62
  * The center point (specified as a map coordinate) of the annotation.
58
63
  */
59
- coordinate: [number, number];
64
+ coordinate: Position;
60
65
 
61
66
  /**
62
67
  * Specifies the anchor being set on a particular point of the annotation.
@@ -104,7 +109,7 @@ type Props = BaseProps & {
104
109
  /**
105
110
  * Expects one child, and an optional callout can be added as well
106
111
  */
107
- children: React.ReactElement;
112
+ children: React.ReactElement | [React.ReactElement, React.ReactElement];
108
113
 
109
114
  style?: ViewProps['style'];
110
115
  };
@@ -19,6 +19,11 @@ type Props = {
19
19
  */
20
20
  id: string;
21
21
 
22
+ /**
23
+ * The id refers to en existing source in the style. Does not create a new source.
24
+ */
25
+ existing?: boolean;
26
+
22
27
  /**
23
28
  * A URL to a TileJSON configuration file describing the source’s contents and other metadata.
24
29
  */
@@ -12,10 +12,15 @@ export const NATIVE_MODULE_NAME = 'RCTMGLRasterLayer';
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.
@@ -20,6 +20,11 @@ type Props = BaseProps & {
20
20
  */
21
21
  id: string;
22
22
 
23
+ /**
24
+ * The id refers to en existing source in the style. Does not create a new source.
25
+ */
26
+ existing?: boolean;
27
+
23
28
  /**
24
29
  * A URL to a TileJSON configuration file describing the source’s contents and other metadata.
25
30
  */
@@ -33,6 +33,11 @@ export type Props = {
33
33
  */
34
34
  id: string;
35
35
 
36
+ /**
37
+ * The id refers to en existing source in the style. Does not create a new source.
38
+ */
39
+ existing?: boolean;
40
+
36
41
  /**
37
42
  * An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle.
38
43
  */
@@ -136,7 +141,7 @@ export type Props = {
136
141
  height: number;
137
142
  };
138
143
 
139
- children: React.ReactElement | React.ReactElement[];
144
+ children?: React.ReactElement | React.ReactElement[];
140
145
  };
141
146
 
142
147
  /**
@@ -16,6 +16,11 @@ export type Props = {
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.