@rnmapbox/maps 10.0.0-beta.76 → 10.0.0-beta.78

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 (426) hide show
  1. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/AbstractMapFeature.kt +10 -1
  2. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerView.kt +4 -2
  3. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLPointAnnotation.kt +4 -3
  4. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraUpdateQueue.kt +1 -3
  5. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/RCTMGLCamera.kt +17 -22
  6. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/images/RCTMGLImages.kt +3 -2
  7. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/location/RCTMGLNativeUserLocation.kt +3 -2
  8. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +82 -75
  9. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapViewManager.kt +8 -6
  10. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyle.kt +7 -1
  11. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +5 -5
  12. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/atmosphere/RCTMGLAtmosphere.kt +3 -2
  13. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTLayer.kt +43 -15
  14. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.kt +21 -0
  15. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.kt +65 -0
  16. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayer.kt +40 -0
  17. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayerManager.kt +76 -0
  18. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayer.kt +43 -0
  19. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayerManager.kt +76 -0
  20. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayer.kt +40 -0
  21. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayerManager.kt +76 -0
  22. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayer.kt +40 -0
  23. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayerManager.kt +76 -0
  24. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayer.kt +40 -0
  25. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayerManager.kt +76 -0
  26. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayer.kt +18 -0
  27. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayerManager.kt +65 -0
  28. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSkyLayerManager.kt +76 -0
  29. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayer.kt +40 -0
  30. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayerManager.kt +76 -0
  31. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/light/RCTMGLLight.kt +4 -1
  32. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSource.kt +69 -0
  33. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.kt +54 -0
  34. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSource.kt +82 -0
  35. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSourceManager.kt +30 -0
  36. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSource.kt +37 -0
  37. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSourceManager.kt +32 -0
  38. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSource.kt +5 -0
  39. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSourceManager.kt +10 -4
  40. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSource.kt +44 -0
  41. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.kt +69 -0
  42. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSource.kt +78 -0
  43. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSourceManager.kt +69 -0
  44. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTSource.kt +107 -87
  45. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/terrain/RCTMGLTerrain.kt +3 -2
  46. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/events/PointAnnotationDragEvent.java +4 -2
  47. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/modules/RCTMGLOfflineModule.kt +4 -4
  48. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/utils/GeoJSONUtils.kt +52 -44
  49. package/ios/RCTMGL-v10/RCTMGLCamera.swift +11 -31
  50. package/ios/RCTMGL-v10/RCTMGLInteractiveElement.swift +13 -1
  51. package/ios/RCTMGL-v10/RCTMGLLayer.swift +35 -6
  52. package/ios/RCTMGL-v10/RCTMGLLocationModule.swift +27 -4
  53. package/ios/RCTMGL-v10/RCTMGLMapView.swift +17 -2
  54. package/ios/RCTMGL-v10/RCTMGLMapViewManager.m +1 -0
  55. package/ios/RCTMGL-v10/RCTMGLSource.swift +35 -17
  56. package/lib/commonjs/MGLModule.js.map +1 -1
  57. package/lib/commonjs/Mapbox.js +13 -6
  58. package/lib/commonjs/Mapbox.js.map +1 -1
  59. package/lib/commonjs/classes/AnimatedCoordinatesArray.js.map +1 -1
  60. package/lib/commonjs/classes/AnimatedExtractCoordinateFromArray.js.map +1 -1
  61. package/lib/commonjs/classes/AnimatedPoint.js.map +1 -1
  62. package/lib/commonjs/classes/AnimatedRouteCoordinatesArray.js.map +1 -1
  63. package/lib/commonjs/classes/AnimatedShape.js.map +1 -1
  64. package/lib/commonjs/classes/index.d.js.map +1 -1
  65. package/lib/commonjs/classes/index.js.map +1 -1
  66. package/lib/commonjs/components/AbstractLayer.js +1 -2
  67. package/lib/commonjs/components/AbstractLayer.js.map +1 -1
  68. package/lib/commonjs/components/AbstractSource.js.map +1 -1
  69. package/lib/commonjs/components/Annotation.js.map +1 -1
  70. package/lib/commonjs/components/Atmosphere.js.map +1 -1
  71. package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
  72. package/lib/commonjs/components/Callout.js +7 -33
  73. package/lib/commonjs/components/Callout.js.map +1 -1
  74. package/lib/commonjs/components/Camera.js +4 -4
  75. package/lib/commonjs/components/Camera.js.map +1 -1
  76. package/lib/commonjs/components/CircleLayer.js.map +1 -1
  77. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
  78. package/lib/commonjs/components/FillLayer.js.map +1 -1
  79. package/lib/commonjs/components/HeadingIndicator.js +12 -3
  80. package/lib/commonjs/components/HeadingIndicator.js.map +1 -1
  81. package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
  82. package/lib/commonjs/components/Image.js.map +1 -1
  83. package/lib/commonjs/components/ImageSource.js.map +1 -1
  84. package/lib/commonjs/components/Images.js.map +1 -1
  85. package/lib/commonjs/components/Light.js.map +1 -1
  86. package/lib/commonjs/components/LineLayer.js.map +1 -1
  87. package/lib/commonjs/components/MapView.js +12 -1
  88. package/lib/commonjs/components/MapView.js.map +1 -1
  89. package/lib/commonjs/components/MarkerView.js.map +1 -1
  90. package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -1
  91. package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
  92. package/lib/commonjs/components/PointAnnotation.js.map +1 -1
  93. package/lib/commonjs/components/RasterDemSource.js.map +1 -1
  94. package/lib/commonjs/components/RasterLayer.js.map +1 -1
  95. package/lib/commonjs/components/RasterSource.js.map +1 -1
  96. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  97. package/lib/commonjs/components/SkyLayer.js.map +1 -1
  98. package/lib/commonjs/components/Style.js.map +1 -1
  99. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  100. package/lib/commonjs/components/Terrain.js.map +1 -1
  101. package/lib/commonjs/components/UserLocation.js +6 -5
  102. package/lib/commonjs/components/UserLocation.js.map +1 -1
  103. package/lib/commonjs/components/VectorSource.js.map +1 -1
  104. package/lib/commonjs/global.d.js.map +1 -1
  105. package/lib/commonjs/index.js.map +1 -1
  106. package/lib/commonjs/index.web.js.map +1 -1
  107. package/lib/commonjs/modules/location/locationManager.js.map +1 -1
  108. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  109. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
  110. package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
  111. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
  112. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -1
  113. package/lib/commonjs/requestAndroidLocationPermissions.js.map +1 -1
  114. package/lib/commonjs/types/BaseProps.js.map +1 -1
  115. package/lib/commonjs/types/OnPressEvent.js.map +1 -1
  116. package/lib/commonjs/types/Position.js.map +1 -1
  117. package/lib/commonjs/types/index.js.map +1 -1
  118. package/lib/commonjs/utils/BridgeValue.js.map +1 -1
  119. package/lib/commonjs/utils/Logger.js.map +1 -1
  120. package/lib/commonjs/utils/MapboxStyles.d.js +84 -84
  121. package/lib/commonjs/utils/MapboxStyles.d.js.map +1 -1
  122. package/lib/commonjs/utils/StyleValue.js.map +1 -1
  123. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  124. package/lib/commonjs/utils/deprecation.js.map +1 -1
  125. package/lib/commonjs/utils/filterUtils.js.map +1 -1
  126. package/lib/commonjs/utils/geoUtils.js.map +1 -1
  127. package/lib/commonjs/utils/getAnnotationsLayerID.js.map +1 -1
  128. package/lib/commonjs/utils/index.js +0 -16
  129. package/lib/commonjs/utils/index.js.map +1 -1
  130. package/lib/commonjs/utils/nativeRef.js.map +1 -1
  131. package/lib/commonjs/utils/styleMap.js +1 -1217
  132. package/lib/commonjs/utils/styleMap.js.map +1 -1
  133. package/lib/commonjs/web/MapContext.js.map +1 -1
  134. package/lib/commonjs/web/MapboxModule.js.map +1 -1
  135. package/lib/commonjs/web/UnimplementedComponent.js.map +1 -1
  136. package/lib/commonjs/web/components/Camera.js.map +1 -1
  137. package/lib/commonjs/web/components/MapView.js.map +1 -1
  138. package/lib/commonjs/web/index.js.map +1 -1
  139. package/lib/commonjs/web/utils/Logger.js.map +1 -1
  140. package/lib/module/MGLModule.js.map +1 -1
  141. package/lib/module/Mapbox.js +6 -6
  142. package/lib/module/Mapbox.js.map +1 -1
  143. package/lib/module/classes/AnimatedCoordinatesArray.js.map +1 -1
  144. package/lib/module/classes/AnimatedExtractCoordinateFromArray.js.map +1 -1
  145. package/lib/module/classes/AnimatedPoint.js.map +1 -1
  146. package/lib/module/classes/AnimatedRouteCoordinatesArray.js.map +1 -1
  147. package/lib/module/classes/AnimatedShape.js.map +1 -1
  148. package/lib/module/classes/index.d.js.map +1 -1
  149. package/lib/module/classes/index.js.map +1 -1
  150. package/lib/module/components/AbstractLayer.js +1 -1
  151. package/lib/module/components/AbstractLayer.js.map +1 -1
  152. package/lib/module/components/AbstractSource.js.map +1 -1
  153. package/lib/module/components/Annotation.js.map +1 -1
  154. package/lib/module/components/Atmosphere.js.map +1 -1
  155. package/lib/module/components/BackgroundLayer.js.map +1 -1
  156. package/lib/module/components/Callout.js +7 -33
  157. package/lib/module/components/Callout.js.map +1 -1
  158. package/lib/module/components/Camera.js +3 -3
  159. package/lib/module/components/Camera.js.map +1 -1
  160. package/lib/module/components/CircleLayer.js.map +1 -1
  161. package/lib/module/components/FillExtrusionLayer.js.map +1 -1
  162. package/lib/module/components/FillLayer.js.map +1 -1
  163. package/lib/module/components/HeadingIndicator.js +12 -3
  164. package/lib/module/components/HeadingIndicator.js.map +1 -1
  165. package/lib/module/components/HeatmapLayer.js.map +1 -1
  166. package/lib/module/components/Image.js.map +1 -1
  167. package/lib/module/components/ImageSource.js.map +1 -1
  168. package/lib/module/components/Images.js.map +1 -1
  169. package/lib/module/components/Light.js.map +1 -1
  170. package/lib/module/components/LineLayer.js.map +1 -1
  171. package/lib/module/components/MapView.js +12 -1
  172. package/lib/module/components/MapView.js.map +1 -1
  173. package/lib/module/components/MarkerView.js.map +1 -1
  174. package/lib/module/components/NativeBridgeComponent.js.map +1 -1
  175. package/lib/module/components/NativeUserLocation.js.map +1 -1
  176. package/lib/module/components/PointAnnotation.js.map +1 -1
  177. package/lib/module/components/RasterDemSource.js.map +1 -1
  178. package/lib/module/components/RasterLayer.js.map +1 -1
  179. package/lib/module/components/RasterSource.js.map +1 -1
  180. package/lib/module/components/ShapeSource.js.map +1 -1
  181. package/lib/module/components/SkyLayer.js.map +1 -1
  182. package/lib/module/components/Style.js.map +1 -1
  183. package/lib/module/components/SymbolLayer.js.map +1 -1
  184. package/lib/module/components/Terrain.js.map +1 -1
  185. package/lib/module/components/UserLocation.js +5 -4
  186. package/lib/module/components/UserLocation.js.map +1 -1
  187. package/lib/module/components/VectorSource.js.map +1 -1
  188. package/lib/module/global.d.js.map +1 -1
  189. package/lib/module/index.js.map +1 -1
  190. package/lib/module/index.web.js.map +1 -1
  191. package/lib/module/modules/location/locationManager.js.map +1 -1
  192. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  193. package/lib/module/modules/offline/OfflinePack.js.map +1 -1
  194. package/lib/module/modules/offline/offlineManager.js.map +1 -1
  195. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
  196. package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
  197. package/lib/module/requestAndroidLocationPermissions.js.map +1 -1
  198. package/lib/module/types/BaseProps.js.map +1 -1
  199. package/lib/module/types/OnPressEvent.js.map +1 -1
  200. package/lib/module/types/Position.js.map +1 -1
  201. package/lib/module/types/index.js.map +1 -1
  202. package/lib/module/utils/BridgeValue.js.map +1 -1
  203. package/lib/module/utils/Logger.js.map +1 -1
  204. package/lib/module/utils/MapboxStyles.d.js +84 -84
  205. package/lib/module/utils/MapboxStyles.d.js.map +1 -1
  206. package/lib/module/utils/StyleValue.js.map +1 -1
  207. package/lib/module/utils/animated/Animated.js.map +1 -1
  208. package/lib/module/utils/deprecation.js.map +1 -1
  209. package/lib/module/utils/filterUtils.js.map +1 -1
  210. package/lib/module/utils/geoUtils.js.map +1 -1
  211. package/lib/module/utils/getAnnotationsLayerID.js.map +1 -1
  212. package/lib/module/utils/index.js +0 -14
  213. package/lib/module/utils/index.js.map +1 -1
  214. package/lib/module/utils/nativeRef.js.map +1 -1
  215. package/lib/module/utils/styleMap.js +0 -1201
  216. package/lib/module/utils/styleMap.js.map +1 -1
  217. package/lib/module/web/MapContext.js.map +1 -1
  218. package/lib/module/web/MapboxModule.js.map +1 -1
  219. package/lib/module/web/UnimplementedComponent.js.map +1 -1
  220. package/lib/module/web/components/Camera.js.map +1 -1
  221. package/lib/module/web/components/MapView.js.map +1 -1
  222. package/lib/module/web/index.js.map +1 -1
  223. package/lib/module/web/utils/Logger.js.map +1 -1
  224. package/lib/typescript/MGLModule.d.ts.map +1 -1
  225. package/lib/typescript/Mapbox.d.ts +1 -1
  226. package/lib/typescript/Mapbox.d.ts.map +1 -1
  227. package/lib/typescript/components/AbstractLayer.d.ts +1 -0
  228. package/lib/typescript/components/AbstractLayer.d.ts.map +1 -1
  229. package/lib/typescript/components/AbstractSource.d.ts.map +1 -1
  230. package/lib/typescript/components/Annotation.d.ts.map +1 -1
  231. package/lib/typescript/components/Atmosphere.d.ts.map +1 -1
  232. package/lib/typescript/components/BackgroundLayer.d.ts +5 -1
  233. package/lib/typescript/components/BackgroundLayer.d.ts.map +1 -1
  234. package/lib/typescript/components/Callout.d.ts +41 -0
  235. package/lib/typescript/components/Callout.d.ts.map +1 -0
  236. package/lib/typescript/components/Camera.d.ts +2 -1
  237. package/lib/typescript/components/Camera.d.ts.map +1 -1
  238. package/lib/typescript/components/CircleLayer.d.ts +4 -0
  239. package/lib/typescript/components/CircleLayer.d.ts.map +1 -1
  240. package/lib/typescript/components/FillExtrusionLayer.d.ts +5 -1
  241. package/lib/typescript/components/FillExtrusionLayer.d.ts.map +1 -1
  242. package/lib/typescript/components/FillLayer.d.ts +4 -0
  243. package/lib/typescript/components/FillLayer.d.ts.map +1 -1
  244. package/lib/typescript/components/HeadingIndicator.d.ts +2 -1
  245. package/lib/typescript/components/HeadingIndicator.d.ts.map +1 -1
  246. package/lib/typescript/components/HeatmapLayer.d.ts +5 -1
  247. package/lib/typescript/components/HeatmapLayer.d.ts.map +1 -1
  248. package/lib/typescript/components/Image.d.ts.map +1 -1
  249. package/lib/typescript/components/ImageSource.d.ts +4 -0
  250. package/lib/typescript/components/ImageSource.d.ts.map +1 -1
  251. package/lib/typescript/components/Images.d.ts.map +1 -1
  252. package/lib/typescript/components/Light.d.ts.map +1 -1
  253. package/lib/typescript/components/LineLayer.d.ts +4 -0
  254. package/lib/typescript/components/LineLayer.d.ts.map +1 -1
  255. package/lib/typescript/components/MapView.d.ts +15 -5
  256. package/lib/typescript/components/MapView.d.ts.map +1 -1
  257. package/lib/typescript/components/MarkerView.d.ts.map +1 -1
  258. package/lib/typescript/components/NativeBridgeComponent.d.ts.map +1 -1
  259. package/lib/typescript/components/NativeUserLocation.d.ts.map +1 -1
  260. package/lib/typescript/components/PointAnnotation.d.ts +5 -9
  261. package/lib/typescript/components/PointAnnotation.d.ts.map +1 -1
  262. package/lib/typescript/components/RasterDemSource.d.ts +4 -0
  263. package/lib/typescript/components/RasterDemSource.d.ts.map +1 -1
  264. package/lib/typescript/components/RasterLayer.d.ts +5 -1
  265. package/lib/typescript/components/RasterLayer.d.ts.map +1 -1
  266. package/lib/typescript/components/RasterSource.d.ts +4 -0
  267. package/lib/typescript/components/RasterSource.d.ts.map +1 -1
  268. package/lib/typescript/components/ShapeSource.d.ts +4 -0
  269. package/lib/typescript/components/ShapeSource.d.ts.map +1 -1
  270. package/lib/typescript/components/SkyLayer.d.ts +4 -0
  271. package/lib/typescript/components/SkyLayer.d.ts.map +1 -1
  272. package/lib/typescript/components/Style.d.ts.map +1 -1
  273. package/lib/typescript/components/SymbolLayer.d.ts +5 -1
  274. package/lib/typescript/components/SymbolLayer.d.ts.map +1 -1
  275. package/lib/typescript/components/Terrain.d.ts.map +1 -1
  276. package/lib/typescript/components/UserLocation.d.ts +1 -1
  277. package/lib/typescript/components/UserLocation.d.ts.map +1 -1
  278. package/lib/typescript/components/VectorSource.d.ts +4 -0
  279. package/lib/typescript/components/VectorSource.d.ts.map +1 -1
  280. package/lib/typescript/index.d.ts.map +1 -1
  281. package/lib/typescript/modules/location/locationManager.d.ts.map +1 -1
  282. package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
  283. package/lib/typescript/modules/offline/OfflinePack.d.ts.map +1 -1
  284. package/lib/typescript/modules/offline/offlineManager.d.ts.map +1 -1
  285. package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
  286. package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +1 -1
  287. package/lib/typescript/requestAndroidLocationPermissions.d.ts.map +1 -1
  288. package/lib/typescript/types/BaseProps.d.ts +1 -0
  289. package/lib/typescript/types/BaseProps.d.ts.map +1 -1
  290. package/lib/typescript/types/OnPressEvent.d.ts.map +1 -1
  291. package/lib/typescript/types/Position.d.ts.map +1 -1
  292. package/lib/typescript/types/index.d.ts.map +1 -1
  293. package/lib/typescript/utils/BridgeValue.d.ts.map +1 -1
  294. package/lib/typescript/utils/Logger.d.ts.map +1 -1
  295. package/lib/typescript/utils/StyleValue.d.ts.map +1 -1
  296. package/lib/typescript/utils/animated/Animated.d.ts.map +1 -1
  297. package/lib/typescript/utils/deprecation.d.ts.map +1 -1
  298. package/lib/typescript/utils/filterUtils.d.ts.map +1 -1
  299. package/lib/typescript/utils/geoUtils.d.ts.map +1 -1
  300. package/lib/typescript/utils/getAnnotationsLayerID.d.ts.map +1 -1
  301. package/lib/typescript/utils/index.d.ts +0 -14
  302. package/lib/typescript/utils/index.d.ts.map +1 -1
  303. package/lib/typescript/utils/nativeRef.d.ts.map +1 -1
  304. package/lib/typescript/utils/styleMap.d.ts +0 -1406
  305. package/lib/typescript/utils/styleMap.d.ts.map +1 -1
  306. package/lib/typescript/web/MapContext.d.ts.map +1 -1
  307. package/lib/typescript/web/components/Camera.d.ts.map +1 -1
  308. package/lib/typescript/web/components/MapView.d.ts.map +1 -1
  309. package/lib/typescript/web/utils/Logger.d.ts.map +1 -1
  310. package/package.json +37 -39
  311. package/plugin/build/withMapbox.d.ts +10 -6
  312. package/plugin/build/withMapbox.js +122 -137
  313. package/plugin/install.md +21 -0
  314. package/plugin/src/withMapbox.ts +172 -139
  315. package/{javascript → src}/Mapbox.ts +4 -1
  316. package/{javascript → src}/components/AbstractLayer.tsx +2 -1
  317. package/{javascript → src}/components/BackgroundLayer.tsx +6 -1
  318. package/{javascript/components/Callout.js → src/components/Callout.tsx} +53 -45
  319. package/{javascript → src}/components/Camera.tsx +2 -1
  320. package/{javascript → src}/components/CircleLayer.tsx +5 -0
  321. package/{javascript → src}/components/FillExtrusionLayer.tsx +6 -1
  322. package/{javascript → src}/components/FillLayer.tsx +5 -0
  323. package/src/components/HeadingIndicator.tsx +41 -0
  324. package/{javascript → src}/components/HeatmapLayer.tsx +6 -1
  325. package/{javascript → src}/components/ImageSource.tsx +5 -0
  326. package/{javascript → src}/components/LineLayer.tsx +5 -0
  327. package/{javascript → src}/components/MapView.tsx +31 -7
  328. package/{javascript → src}/components/PointAnnotation.tsx +8 -4
  329. package/{javascript → src}/components/RasterDemSource.tsx +5 -0
  330. package/{javascript → src}/components/RasterLayer.tsx +6 -1
  331. package/{javascript → src}/components/RasterSource.tsx +5 -0
  332. package/{javascript → src}/components/ShapeSource.tsx +5 -0
  333. package/{javascript → src}/components/SkyLayer.tsx +5 -0
  334. package/{javascript → src}/components/SymbolLayer.tsx +6 -1
  335. package/{javascript → src}/components/UserLocation.tsx +2 -2
  336. package/{javascript → src}/components/VectorSource.tsx +5 -0
  337. package/{javascript → src}/types/BaseProps.ts +1 -0
  338. package/{javascript → src}/utils/index.ts +0 -8
  339. package/src/utils/styleMap.ts +284 -0
  340. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayer.java +0 -23
  341. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLBackgroundLayerManager.java +0 -60
  342. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayer.java +0 -53
  343. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLCircleLayerManager.java +0 -73
  344. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayer.java +0 -51
  345. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillExtrusionLayerManager.java +0 -76
  346. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayer.java +0 -51
  347. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLFillLayerManager.java +0 -77
  348. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayer.java +0 -51
  349. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLHeatmapLayerManager.java +0 -73
  350. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayer.java +0 -51
  351. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLLineLayerManager.java +0 -75
  352. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayer.java +0 -24
  353. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLRasterLayerManager.java +0 -60
  354. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSkyLayerManager.java +0 -73
  355. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayer.java +0 -51
  356. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/layers/RCTMGLSymbolLayerManager.java +0 -71
  357. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSource.java +0 -76
  358. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLImageSourceManager.java +0 -68
  359. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSource.java +0 -122
  360. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterDemSourceManager.java +0 -64
  361. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSource.java +0 -43
  362. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLRasterSourceManager.java +0 -39
  363. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSource.java +0 -103
  364. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.java +0 -80
  365. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSource.java +0 -100
  366. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLVectorSourceManager.java +0 -80
  367. package/javascript/components/Callout.d.ts +0 -35
  368. package/javascript/components/HeadingIndicator.tsx +0 -30
  369. package/javascript/utils/styleMap.ts +0 -1882
  370. package/lib/commonjs/components/Callout.d.js +0 -9
  371. package/lib/commonjs/components/Callout.d.js.map +0 -1
  372. package/lib/module/components/Callout.d.js +0 -2
  373. package/lib/module/components/Callout.d.js.map +0 -1
  374. /package/{javascript → src}/MGLModule.ts +0 -0
  375. /package/{javascript → src}/assets/heading.png +0 -0
  376. /package/{javascript → src}/assets/heading@2x.png +0 -0
  377. /package/{javascript → src}/assets/heading@3x.png +0 -0
  378. /package/{javascript → src}/classes/AnimatedCoordinatesArray.js +0 -0
  379. /package/{javascript → src}/classes/AnimatedExtractCoordinateFromArray.js +0 -0
  380. /package/{javascript → src}/classes/AnimatedPoint.js +0 -0
  381. /package/{javascript → src}/classes/AnimatedRouteCoordinatesArray.js +0 -0
  382. /package/{javascript → src}/classes/AnimatedShape.js +0 -0
  383. /package/{javascript → src}/classes/index.d.ts +0 -0
  384. /package/{javascript → src}/classes/index.js +0 -0
  385. /package/{javascript → src}/components/AbstractSource.tsx +0 -0
  386. /package/{javascript → src}/components/Annotation.tsx +0 -0
  387. /package/{javascript → src}/components/Atmosphere.tsx +0 -0
  388. /package/{javascript → src}/components/Image.tsx +0 -0
  389. /package/{javascript → src}/components/Images.tsx +0 -0
  390. /package/{javascript → src}/components/Light.tsx +0 -0
  391. /package/{javascript → src}/components/MarkerView.tsx +0 -0
  392. /package/{javascript → src}/components/NativeBridgeComponent.tsx +0 -0
  393. /package/{javascript → src}/components/NativeUserLocation.tsx +0 -0
  394. /package/{javascript → src}/components/Style.tsx +0 -0
  395. /package/{javascript → src}/components/Terrain.tsx +0 -0
  396. /package/{javascript → src}/global.d.ts +0 -0
  397. /package/{javascript → src}/index.ts +0 -0
  398. /package/{javascript → src}/index.web.js +0 -0
  399. /package/{javascript → src}/modules/location/locationManager.ts +0 -0
  400. /package/{javascript → src}/modules/offline/OfflineCreatePackOptions.ts +0 -0
  401. /package/{javascript → src}/modules/offline/OfflinePack.ts +0 -0
  402. /package/{javascript → src}/modules/offline/offlineManager.ts +0 -0
  403. /package/{javascript → src}/modules/snapshot/SnapshotOptions.ts +0 -0
  404. /package/{javascript → src}/modules/snapshot/snapshotManager.ts +0 -0
  405. /package/{javascript → src}/requestAndroidLocationPermissions.ts +0 -0
  406. /package/{javascript → src}/types/OnPressEvent.ts +0 -0
  407. /package/{javascript → src}/types/Position.ts +0 -0
  408. /package/{javascript → src}/types/index.ts +0 -0
  409. /package/{javascript → src}/utils/BridgeValue.ts +0 -0
  410. /package/{javascript → src}/utils/Logger.ts +0 -0
  411. /package/{javascript → src}/utils/MapboxStyles.d.ts +0 -0
  412. /package/{javascript → src}/utils/StyleValue.ts +0 -0
  413. /package/{javascript → src}/utils/animated/Animated.ts +0 -0
  414. /package/{javascript → src}/utils/deprecation.ts +0 -0
  415. /package/{javascript → src}/utils/filterUtils.ts +0 -0
  416. /package/{javascript → src}/utils/geoUtils.ts +0 -0
  417. /package/{javascript → src}/utils/getAnnotationsLayerID.ts +0 -0
  418. /package/{javascript → src}/utils/nativeRef.ts +0 -0
  419. /package/{javascript → src}/web/MapContext.ts +0 -0
  420. /package/{javascript → src}/web/MapboxModule.js +0 -0
  421. /package/{javascript → src}/web/UnimplementedComponent.js +0 -0
  422. /package/{javascript → src}/web/components/Camera.tsx +0 -0
  423. /package/{javascript → src}/web/components/MapView.tsx +0 -0
  424. /package/{javascript → src}/web/index.js +0 -0
  425. /package/{javascript → src}/web/install.md +0 -0
  426. /package/{javascript → src}/web/utils/Logger.ts +0 -0
@@ -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.
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+
3
+ import headingIcon from '../assets/heading.png';
4
+ import { BaseProps } from '../types/BaseProps';
5
+
6
+ import { SymbolLayer } from './SymbolLayer';
7
+ import Images from './Images';
8
+
9
+ const style = {
10
+ iconImage: 'userLocationHeading',
11
+ iconAllowOverlap: true,
12
+ iconPitchAlignment: 'map',
13
+ iconRotationAlignment: 'map',
14
+ } as const;
15
+
16
+ type Props = BaseProps & {
17
+ heading?: number;
18
+ };
19
+
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
+ };
40
+
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.
@@ -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.
@@ -78,6 +78,16 @@ export type MapState = {
78
78
  };
79
79
  };
80
80
 
81
+ /**
82
+ * label localization settings (v10 only)
83
+ */
84
+ type LocalizeLabels = {
85
+ /** locale code like `es` or `current` for the device's current locale */
86
+ locale: string;
87
+ /** layer id to localize. If not specified, all layers will be localized */
88
+ layerIds?: string[];
89
+ };
90
+
81
91
  type Props = ViewProps & {
82
92
  /**
83
93
  * The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport.
@@ -110,12 +120,6 @@ type Props = ViewProps & {
110
120
  */
111
121
  preferredFramesPerSecond?: number;
112
122
 
113
- /**
114
- * Automatically change the language of the map labels to the system’s preferred language,
115
- * this is not something that can be toggled on/off
116
- */
117
- localizeLabels?: boolean;
118
-
119
123
  /**
120
124
  * Enable/Disable zoom on the map
121
125
  */
@@ -214,6 +218,12 @@ type Props = ViewProps & {
214
218
  */
215
219
  surfaceView?: boolean;
216
220
 
221
+ /**
222
+ * [`mapbox` (v10) implementation only]
223
+ * Set map's label locale, e.g. { "locale": "es" } will localize labels to Spanish, { "locale": "current" } will localize labels to system locale.
224
+ */
225
+ localizeLabels?: LocalizeLabels;
226
+
217
227
  /**
218
228
  * Map press listener, gets called when a user presses the map
219
229
  */
@@ -371,7 +381,6 @@ class MapView extends NativeBridgeComponent(
371
381
  ) {
372
382
  static defaultProps: Props = {
373
383
  projection: 'mercator',
374
- localizeLabels: false,
375
384
  scrollEnabled: true,
376
385
  pitchEnabled: true,
377
386
  rotateEnabled: true,
@@ -934,6 +943,20 @@ class MapView extends NativeBridgeComponent(
934
943
  }
935
944
  }
936
945
 
946
+ _setLocalizeLabels(props: Props) {
947
+ if (!MapboxGL.MapboxV10) {
948
+ return;
949
+ }
950
+ if (typeof props.localizeLabels === 'boolean') {
951
+ console.warn(
952
+ 'boolean value of localizeLabels is deprecated. Please set this as Locale object instead',
953
+ );
954
+ props.localizeLabels = {
955
+ locale: 'current',
956
+ };
957
+ }
958
+ }
959
+
937
960
  render() {
938
961
  const props = {
939
962
  ...this.props,
@@ -942,6 +965,7 @@ class MapView extends NativeBridgeComponent(
942
965
  };
943
966
 
944
967
  this._setStyleURL(props);
968
+ this._setLocalizeLabels(props);
945
969
 
946
970
  const callbacks = {
947
971
  ref: (nativeRef: RCTMGLMapViewRefType) => this._setNativeRef(nativeRef),
@@ -5,7 +5,7 @@ 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';
@@ -24,9 +24,13 @@ const styles = StyleSheet.create({
24
24
  },
25
25
  });
26
26
 
27
- type FeaturePayload = {
28
- feature: Feature<GeoJSON.Point, { id: string }>;
29
- };
27
+ type FeaturePayload = Feature<
28
+ Point,
29
+ {
30
+ screenPointX: number;
31
+ screenPointY: number;
32
+ }
33
+ >;
30
34
 
31
35
  type Props = BaseProps & {
32
36
  /**
@@ -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
  */
@@ -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.
@@ -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.
@@ -53,7 +53,7 @@ const normalIcon = (
53
53
  style={layerStyles.normal.foreground}
54
54
  />,
55
55
  ...(showsUserHeadingIndicator && typeof heading === 'number'
56
- ? [HeadingIndicator({ heading })]
56
+ ? [HeadingIndicator({ heading, key: 'mapboxUserLocationHeadingIndicator' })]
57
57
  : []),
58
58
  ];
59
59
 
@@ -82,7 +82,7 @@ type Props = {
82
82
  /**
83
83
  * Custom location icon of type mapbox-gl-native components
84
84
  */
85
- children?: ReactElement;
85
+ children?: ReactElement | ReactElement[];
86
86
 
87
87
  /**
88
88
  * Minimum amount of movement before GPS location is updated in meters
@@ -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
  */
@@ -1,3 +1,4 @@
1
1
  export type BaseProps = {
2
+ key?: string;
2
3
  testID?: string | undefined;
3
4
  };
@@ -7,7 +7,6 @@ import {
7
7
  Image,
8
8
  ImageSourcePropType,
9
9
  } from 'react-native';
10
- import PropTypes from 'prop-types';
11
10
 
12
11
  function getAndroidManagerInstance(module: string) {
13
12
  const haveViewManagerConfig =
@@ -21,13 +20,6 @@ function getIosManagerInstance(module: string): any {
21
20
  return NativeModules[getIOSModuleName(module)];
22
21
  }
23
22
 
24
- export const ornamentPositionPropType = PropTypes.oneOfType([
25
- PropTypes.shape({ top: PropTypes.number, left: PropTypes.number }),
26
- PropTypes.shape({ top: PropTypes.number, right: PropTypes.number }),
27
- PropTypes.shape({ bottom: PropTypes.number, left: PropTypes.number }),
28
- PropTypes.shape({ bottom: PropTypes.number, right: PropTypes.number }),
29
- ]);
30
-
31
23
  export function isAndroid(): boolean {
32
24
  return Platform.OS === 'android';
33
25
  }
@@ -0,0 +1,284 @@
1
+ // DO NOT MODIFY
2
+ // THIS FILE IS AUTOGENERATED
3
+
4
+ import { isAndroid } from './index';
5
+
6
+ export const StyleTypes = {
7
+ Constant: 'constant',
8
+ Color: 'color',
9
+ Transition: 'transition',
10
+ Translation: 'translation',
11
+ Function: 'function',
12
+ Image: 'image',
13
+ Enum: 'enum',
14
+ };
15
+
16
+ export function getStyleType(styleProp: keyof typeof styleExtras) {
17
+ if (!isAndroid() && styleExtras[styleProp]) {
18
+ return styleExtras[styleProp].iosType;
19
+ }
20
+
21
+ if (styleMap[styleProp]) {
22
+ return styleMap[styleProp];
23
+ }
24
+
25
+ throw new Error(`${styleProp} is not a valid Mapbox layer style`);
26
+ }
27
+
28
+ const styleMap = {
29
+ fillSortKey: StyleTypes.Constant,
30
+ fillAntialias: StyleTypes.Constant,
31
+ fillOpacity: StyleTypes.Constant,
32
+ fillOpacityTransition: StyleTypes.Transition,
33
+ fillColor: StyleTypes.Color,
34
+ fillColorTransition: StyleTypes.Transition,
35
+ fillOutlineColor: StyleTypes.Color,
36
+ fillOutlineColorTransition: StyleTypes.Transition,
37
+ fillTranslate: StyleTypes.Translation,
38
+ fillTranslateTransition: StyleTypes.Transition,
39
+ fillTranslateAnchor: StyleTypes.Enum,
40
+ fillPattern: StyleTypes.Image,
41
+
42
+ lineCap: StyleTypes.Enum,
43
+ lineJoin: StyleTypes.Enum,
44
+ lineMiterLimit: StyleTypes.Constant,
45
+ lineRoundLimit: StyleTypes.Constant,
46
+ lineSortKey: StyleTypes.Constant,
47
+ lineOpacity: StyleTypes.Constant,
48
+ lineOpacityTransition: StyleTypes.Transition,
49
+ lineColor: StyleTypes.Color,
50
+ lineColorTransition: StyleTypes.Transition,
51
+ lineTranslate: StyleTypes.Translation,
52
+ lineTranslateTransition: StyleTypes.Transition,
53
+ lineTranslateAnchor: StyleTypes.Enum,
54
+ lineWidth: StyleTypes.Constant,
55
+ lineWidthTransition: StyleTypes.Transition,
56
+ lineGapWidth: StyleTypes.Constant,
57
+ lineGapWidthTransition: StyleTypes.Transition,
58
+ lineOffset: StyleTypes.Constant,
59
+ lineOffsetTransition: StyleTypes.Transition,
60
+ lineBlur: StyleTypes.Constant,
61
+ lineBlurTransition: StyleTypes.Transition,
62
+ lineDasharray: StyleTypes.Constant,
63
+ linePattern: StyleTypes.Image,
64
+ lineGradient: StyleTypes.Color,
65
+ lineTrimOffset: StyleTypes.Constant,
66
+
67
+ symbolPlacement: StyleTypes.Enum,
68
+ symbolSpacing: StyleTypes.Constant,
69
+ symbolAvoidEdges: StyleTypes.Constant,
70
+ symbolSortKey: StyleTypes.Constant,
71
+ symbolZOrder: StyleTypes.Enum,
72
+ iconAllowOverlap: StyleTypes.Constant,
73
+ iconIgnorePlacement: StyleTypes.Constant,
74
+ iconOptional: StyleTypes.Constant,
75
+ iconRotationAlignment: StyleTypes.Enum,
76
+ iconSize: StyleTypes.Constant,
77
+ iconTextFit: StyleTypes.Enum,
78
+ iconTextFitPadding: StyleTypes.Constant,
79
+ iconImage: StyleTypes.Image,
80
+ iconRotate: StyleTypes.Constant,
81
+ iconPadding: StyleTypes.Constant,
82
+ iconKeepUpright: StyleTypes.Constant,
83
+ iconOffset: StyleTypes.Constant,
84
+ iconAnchor: StyleTypes.Enum,
85
+ iconPitchAlignment: StyleTypes.Enum,
86
+ textPitchAlignment: StyleTypes.Enum,
87
+ textRotationAlignment: StyleTypes.Enum,
88
+ textField: StyleTypes.Constant,
89
+ textFont: StyleTypes.Constant,
90
+ textSize: StyleTypes.Constant,
91
+ textMaxWidth: StyleTypes.Constant,
92
+ textLineHeight: StyleTypes.Constant,
93
+ textLetterSpacing: StyleTypes.Constant,
94
+ textJustify: StyleTypes.Enum,
95
+ textRadialOffset: StyleTypes.Constant,
96
+ textVariableAnchor: StyleTypes.Constant,
97
+ textAnchor: StyleTypes.Enum,
98
+ textMaxAngle: StyleTypes.Constant,
99
+ textWritingMode: StyleTypes.Constant,
100
+ textRotate: StyleTypes.Constant,
101
+ textPadding: StyleTypes.Constant,
102
+ textKeepUpright: StyleTypes.Constant,
103
+ textTransform: StyleTypes.Enum,
104
+ textOffset: StyleTypes.Constant,
105
+ textAllowOverlap: StyleTypes.Constant,
106
+ textIgnorePlacement: StyleTypes.Constant,
107
+ textOptional: StyleTypes.Constant,
108
+ iconOpacity: StyleTypes.Constant,
109
+ iconOpacityTransition: StyleTypes.Transition,
110
+ iconColor: StyleTypes.Color,
111
+ iconColorTransition: StyleTypes.Transition,
112
+ iconHaloColor: StyleTypes.Color,
113
+ iconHaloColorTransition: StyleTypes.Transition,
114
+ iconHaloWidth: StyleTypes.Constant,
115
+ iconHaloWidthTransition: StyleTypes.Transition,
116
+ iconHaloBlur: StyleTypes.Constant,
117
+ iconHaloBlurTransition: StyleTypes.Transition,
118
+ iconTranslate: StyleTypes.Translation,
119
+ iconTranslateTransition: StyleTypes.Transition,
120
+ iconTranslateAnchor: StyleTypes.Enum,
121
+ textOpacity: StyleTypes.Constant,
122
+ textOpacityTransition: StyleTypes.Transition,
123
+ textColor: StyleTypes.Color,
124
+ textColorTransition: StyleTypes.Transition,
125
+ textHaloColor: StyleTypes.Color,
126
+ textHaloColorTransition: StyleTypes.Transition,
127
+ textHaloWidth: StyleTypes.Constant,
128
+ textHaloWidthTransition: StyleTypes.Transition,
129
+ textHaloBlur: StyleTypes.Constant,
130
+ textHaloBlurTransition: StyleTypes.Transition,
131
+ textTranslate: StyleTypes.Translation,
132
+ textTranslateTransition: StyleTypes.Transition,
133
+ textTranslateAnchor: StyleTypes.Enum,
134
+
135
+ circleSortKey: StyleTypes.Constant,
136
+ circleRadius: StyleTypes.Constant,
137
+ circleRadiusTransition: StyleTypes.Transition,
138
+ circleColor: StyleTypes.Color,
139
+ circleColorTransition: StyleTypes.Transition,
140
+ circleBlur: StyleTypes.Constant,
141
+ circleBlurTransition: StyleTypes.Transition,
142
+ circleOpacity: StyleTypes.Constant,
143
+ circleOpacityTransition: StyleTypes.Transition,
144
+ circleTranslate: StyleTypes.Translation,
145
+ circleTranslateTransition: StyleTypes.Transition,
146
+ circleTranslateAnchor: StyleTypes.Enum,
147
+ circlePitchScale: StyleTypes.Enum,
148
+ circlePitchAlignment: StyleTypes.Enum,
149
+ circleStrokeWidth: StyleTypes.Constant,
150
+ circleStrokeWidthTransition: StyleTypes.Transition,
151
+ circleStrokeColor: StyleTypes.Color,
152
+ circleStrokeColorTransition: StyleTypes.Transition,
153
+ circleStrokeOpacity: StyleTypes.Constant,
154
+ circleStrokeOpacityTransition: StyleTypes.Transition,
155
+
156
+ heatmapRadius: StyleTypes.Constant,
157
+ heatmapRadiusTransition: StyleTypes.Transition,
158
+ heatmapWeight: StyleTypes.Constant,
159
+ heatmapIntensity: StyleTypes.Constant,
160
+ heatmapIntensityTransition: StyleTypes.Transition,
161
+ heatmapColor: StyleTypes.Color,
162
+ heatmapOpacity: StyleTypes.Constant,
163
+ heatmapOpacityTransition: StyleTypes.Transition,
164
+
165
+ fillExtrusionOpacity: StyleTypes.Constant,
166
+ fillExtrusionOpacityTransition: StyleTypes.Transition,
167
+ fillExtrusionColor: StyleTypes.Color,
168
+ fillExtrusionColorTransition: StyleTypes.Transition,
169
+ fillExtrusionTranslate: StyleTypes.Translation,
170
+ fillExtrusionTranslateTransition: StyleTypes.Transition,
171
+ fillExtrusionTranslateAnchor: StyleTypes.Enum,
172
+ fillExtrusionPattern: StyleTypes.Image,
173
+ fillExtrusionHeight: StyleTypes.Constant,
174
+ fillExtrusionHeightTransition: StyleTypes.Transition,
175
+ fillExtrusionBase: StyleTypes.Constant,
176
+ fillExtrusionBaseTransition: StyleTypes.Transition,
177
+ fillExtrusionVerticalGradient: StyleTypes.Constant,
178
+
179
+ rasterOpacity: StyleTypes.Constant,
180
+ rasterOpacityTransition: StyleTypes.Transition,
181
+ rasterHueRotate: StyleTypes.Constant,
182
+ rasterHueRotateTransition: StyleTypes.Transition,
183
+ rasterBrightnessMin: StyleTypes.Constant,
184
+ rasterBrightnessMinTransition: StyleTypes.Transition,
185
+ rasterBrightnessMax: StyleTypes.Constant,
186
+ rasterBrightnessMaxTransition: StyleTypes.Transition,
187
+ rasterSaturation: StyleTypes.Constant,
188
+ rasterSaturationTransition: StyleTypes.Transition,
189
+ rasterContrast: StyleTypes.Constant,
190
+ rasterContrastTransition: StyleTypes.Transition,
191
+ rasterResampling: StyleTypes.Enum,
192
+ rasterFadeDuration: StyleTypes.Constant,
193
+
194
+ hillshadeIlluminationDirection: StyleTypes.Constant,
195
+ hillshadeIlluminationAnchor: StyleTypes.Enum,
196
+ hillshadeExaggeration: StyleTypes.Constant,
197
+ hillshadeExaggerationTransition: StyleTypes.Transition,
198
+ hillshadeShadowColor: StyleTypes.Color,
199
+ hillshadeShadowColorTransition: StyleTypes.Transition,
200
+ hillshadeHighlightColor: StyleTypes.Color,
201
+ hillshadeHighlightColorTransition: StyleTypes.Transition,
202
+ hillshadeAccentColor: StyleTypes.Color,
203
+ hillshadeAccentColorTransition: StyleTypes.Transition,
204
+
205
+ backgroundColor: StyleTypes.Color,
206
+ backgroundColorTransition: StyleTypes.Transition,
207
+ backgroundPattern: StyleTypes.Image,
208
+ backgroundOpacity: StyleTypes.Constant,
209
+ backgroundOpacityTransition: StyleTypes.Transition,
210
+
211
+ skyType: StyleTypes.Enum,
212
+ skyAtmosphereSun: StyleTypes.Constant,
213
+ skyAtmosphereSunIntensity: StyleTypes.Constant,
214
+ skyGradientCenter: StyleTypes.Constant,
215
+ skyGradientRadius: StyleTypes.Constant,
216
+ skyGradient: StyleTypes.Color,
217
+ skyAtmosphereHaloColor: StyleTypes.Color,
218
+ skyAtmosphereColor: StyleTypes.Color,
219
+ skyOpacity: StyleTypes.Constant,
220
+ skyOpacityTransition: StyleTypes.Transition,
221
+
222
+ anchor: StyleTypes.Enum,
223
+ position: StyleTypes.Constant,
224
+ positionTransition: StyleTypes.Transition,
225
+ intensity: StyleTypes.Constant,
226
+ intensityTransition: StyleTypes.Transition,
227
+
228
+ range: StyleTypes.Constant,
229
+ rangeTransition: StyleTypes.Transition,
230
+ highColor: StyleTypes.Color,
231
+ highColorTransition: StyleTypes.Transition,
232
+ spaceColor: StyleTypes.Color,
233
+ spaceColorTransition: StyleTypes.Transition,
234
+ horizonBlend: StyleTypes.Constant,
235
+ horizonBlendTransition: StyleTypes.Transition,
236
+ starIntensity: StyleTypes.Constant,
237
+ starIntensityTransition: StyleTypes.Transition,
238
+
239
+ source: StyleTypes.Constant,
240
+ exaggeration: StyleTypes.Constant,
241
+ exaggerationTransition: StyleTypes.Transition,
242
+
243
+ color: StyleTypes.Color,
244
+ colorTransition: StyleTypes.Transition,
245
+ visibility: StyleTypes.Constant,
246
+ };
247
+
248
+ export const styleExtras = {
249
+ // padding
250
+ iconTextFitPadding: {
251
+ iosType: 'edgeinsets',
252
+ },
253
+
254
+ // offsets
255
+ iconOffset: {
256
+ iosType: 'vector',
257
+ },
258
+ textOffset: {
259
+ iosType: 'vector',
260
+ },
261
+ lineOffset: {
262
+ iosType: 'vector',
263
+ },
264
+
265
+ // translates
266
+ fillTranslate: {
267
+ iosType: 'vector',
268
+ },
269
+ lineTranslate: {
270
+ iosType: 'vector',
271
+ },
272
+ iconTranslate: {
273
+ iosType: 'vector',
274
+ },
275
+ textTranslate: {
276
+ iosType: 'vector',
277
+ },
278
+ circleTranslate: {
279
+ iosType: 'vector',
280
+ },
281
+ fillExtrusionTranslate: {
282
+ iosType: 'vector',
283
+ },
284
+ };
@@ -1,23 +0,0 @@
1
- package com.mapbox.rctmgl.components.styles.layers;
2
-
3
- import android.content.Context;
4
-
5
- import com.mapbox.maps.extension.style.layers.generated.BackgroundLayer;
6
- import com.mapbox.rctmgl.components.styles.RCTMGLStyle;
7
- import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory;
8
-
9
- public class RCTMGLBackgroundLayer extends RCTLayer<BackgroundLayer> {
10
- public RCTMGLBackgroundLayer(Context context) {
11
- super(context);
12
- }
13
-
14
- @Override
15
- public BackgroundLayer makeLayer() {
16
- return new BackgroundLayer(getID());
17
- }
18
-
19
- @Override
20
- public void addStyles() {
21
- RCTMGLStyleFactory.setBackgroundLayerStyle(mLayer, new RCTMGLStyle(getContext(), mReactStyle, mMap));
22
- }
23
- }