@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
@@ -0,0 +1,76 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import com.facebook.react.bridge.ReadableArray
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.facebook.react.uimanager.ThemedReactContext
6
+ import com.facebook.react.uimanager.ViewGroupManager
7
+ import com.facebook.react.uimanager.annotations.ReactProp
8
+
9
+ class RCTMGLHeatmapLayerManager : ViewGroupManager<RCTMGLHeatmapLayer>() {
10
+ override fun getName(): String {
11
+ return REACT_CLASS
12
+ }
13
+
14
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLHeatmapLayer {
15
+ return RCTMGLHeatmapLayer(reactContext)
16
+ }
17
+
18
+ @ReactProp(name = "id")
19
+ fun setId(layer: RCTMGLHeatmapLayer, id: String?) {
20
+ layer.iD = id
21
+ }
22
+
23
+ @ReactProp(name = "existing")
24
+ fun setExisting(layer: RCTMGLHeatmapLayer, existing: Boolean) {
25
+ layer.setExisting(existing)
26
+ }
27
+
28
+ @ReactProp(name = "sourceID")
29
+ fun setSourceID(layer: RCTMGLHeatmapLayer, sourceID: String?) {
30
+ layer.setSourceID(sourceID)
31
+ }
32
+
33
+ @ReactProp(name = "aboveLayerID")
34
+ fun setAboveLayerID(layer: RCTMGLHeatmapLayer, aboveLayerID: String?) {
35
+ layer.setAboveLayerID(aboveLayerID)
36
+ }
37
+
38
+ @ReactProp(name = "belowLayerID")
39
+ fun setBelowLayerID(layer: RCTMGLHeatmapLayer, belowLayerID: String?) {
40
+ layer.setBelowLayerID(belowLayerID)
41
+ }
42
+
43
+ @ReactProp(name = "layerIndex")
44
+ fun setLayerIndex(layer: RCTMGLHeatmapLayer, layerIndex: Int) {
45
+ layer.setLayerIndex(layerIndex)
46
+ }
47
+
48
+ @ReactProp(name = "minZoomLevel")
49
+ fun setMinZoomLevel(layer: RCTMGLHeatmapLayer, minZoomLevel: Double) {
50
+ layer.setMinZoomLevel(minZoomLevel)
51
+ }
52
+
53
+ @ReactProp(name = "maxZoomLevel")
54
+ fun setMaxZoomLevel(layer: RCTMGLHeatmapLayer, maxZoomLevel: Double) {
55
+ layer.setMaxZoomLevel(maxZoomLevel)
56
+ }
57
+
58
+ @ReactProp(name = "reactStyle")
59
+ fun setReactStyle(layer: RCTMGLHeatmapLayer, style: ReadableMap?) {
60
+ layer.setReactStyle(style)
61
+ }
62
+
63
+ @ReactProp(name = "sourceLayerID")
64
+ fun setSourceLayerId(layer: RCTMGLHeatmapLayer, sourceLayerID: String?) {
65
+ layer.setSourceLayerID(sourceLayerID)
66
+ }
67
+
68
+ @ReactProp(name = "filter")
69
+ fun setFilter(layer: RCTMGLHeatmapLayer, filterList: ReadableArray?) {
70
+ layer.setFilter(filterList)
71
+ }
72
+
73
+ companion object {
74
+ const val REACT_CLASS = "RCTMGLHeatmapLayer"
75
+ }
76
+ }
@@ -0,0 +1,40 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import android.content.Context
4
+ import com.mapbox.maps.extension.style.expressions.generated.Expression
5
+ import com.mapbox.maps.extension.style.layers.generated.LineLayer
6
+ import com.mapbox.rctmgl.components.mapview.RCTMGLMapView
7
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyle
8
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory
9
+
10
+ class RCTMGLLineLayer(context: Context?) : RCTLayer<LineLayer?>(
11
+ context!!
12
+ ) {
13
+ private var mSourceLayerID: String? = null
14
+ override fun updateFilter(expression: Expression?) {
15
+ mLayer!!.filter(expression!!)
16
+ }
17
+
18
+ override fun addToMap(mapView: RCTMGLMapView) {
19
+ super.addToMap(mapView)
20
+ }
21
+
22
+ override fun makeLayer(): LineLayer {
23
+ val layer = LineLayer(iD!!, mSourceID!!)
24
+ if (mSourceLayerID != null) {
25
+ layer.sourceLayer(mSourceLayerID!!)
26
+ }
27
+ return layer
28
+ }
29
+
30
+ override fun addStyles() {
31
+ RCTMGLStyleFactory.setLineLayerStyle(mLayer, RCTMGLStyle(context, mReactStyle, mMap!!))
32
+ }
33
+
34
+ fun setSourceLayerID(sourceLayerID: String?) {
35
+ mSourceLayerID = sourceLayerID
36
+ if (mLayer != null) {
37
+ mLayer!!.sourceLayer(mSourceLayerID!!)
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,76 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import com.facebook.react.bridge.ReadableArray
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.facebook.react.uimanager.ThemedReactContext
6
+ import com.facebook.react.uimanager.ViewGroupManager
7
+ import com.facebook.react.uimanager.annotations.ReactProp
8
+
9
+ class RCTMGLLineLayerManager : ViewGroupManager<RCTMGLLineLayer>() {
10
+ override fun getName(): String {
11
+ return REACT_CLASS
12
+ }
13
+
14
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLLineLayer {
15
+ return RCTMGLLineLayer(reactContext)
16
+ }
17
+
18
+ @ReactProp(name = "id")
19
+ fun setId(layer: RCTMGLLineLayer, id: String?) {
20
+ layer.iD = id
21
+ }
22
+
23
+ @ReactProp(name = "existing")
24
+ fun setExisting(layer: RCTMGLLineLayer, existing: Boolean) {
25
+ layer.setExisting(existing)
26
+ }
27
+
28
+ @ReactProp(name = "sourceID")
29
+ fun setSourceID(layer: RCTMGLLineLayer, sourceID: String?) {
30
+ layer.setSourceID(sourceID)
31
+ }
32
+
33
+ @ReactProp(name = "aboveLayerID")
34
+ fun setAboveLayerID(layer: RCTMGLLineLayer, aboveLayerID: String?) {
35
+ layer.setAboveLayerID(aboveLayerID)
36
+ }
37
+
38
+ @ReactProp(name = "belowLayerID")
39
+ fun setBelowLayerID(layer: RCTMGLLineLayer, belowLayerID: String?) {
40
+ layer.setBelowLayerID(belowLayerID)
41
+ }
42
+
43
+ @ReactProp(name = "layerIndex")
44
+ fun setLayerIndex(layer: RCTMGLLineLayer, layerIndex: Int) {
45
+ layer.setLayerIndex(layerIndex)
46
+ }
47
+
48
+ @ReactProp(name = "minZoomLevel")
49
+ fun setMinZoomLevel(layer: RCTMGLLineLayer, minZoomLevel: Double) {
50
+ layer.setMinZoomLevel(minZoomLevel)
51
+ }
52
+
53
+ @ReactProp(name = "maxZoomLevel")
54
+ fun setMaxZoomLevel(layer: RCTMGLLineLayer, maxZoomLevel: Double) {
55
+ layer.setMaxZoomLevel(maxZoomLevel)
56
+ }
57
+
58
+ @ReactProp(name = "reactStyle")
59
+ fun setReactStyle(layer: RCTMGLLineLayer, style: ReadableMap?) {
60
+ layer.setReactStyle(style)
61
+ }
62
+
63
+ @ReactProp(name = "sourceLayerID")
64
+ fun setSourceLayerId(layer: RCTMGLLineLayer, sourceLayerID: String?) {
65
+ layer.setSourceLayerID(sourceLayerID)
66
+ }
67
+
68
+ @ReactProp(name = "filter")
69
+ fun setFilter(layer: RCTMGLLineLayer, filterList: ReadableArray?) {
70
+ layer.setFilter(filterList)
71
+ }
72
+
73
+ companion object {
74
+ const val REACT_CLASS = "RCTMGLLineLayer"
75
+ }
76
+ }
@@ -0,0 +1,18 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import android.content.Context
4
+ import com.mapbox.maps.extension.style.layers.generated.RasterLayer
5
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyle
6
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory
7
+
8
+ class RCTMGLRasterLayer(context: Context?) : RCTLayer<RasterLayer?>(
9
+ context!!
10
+ ) {
11
+ override fun makeLayer(): RasterLayer {
12
+ return RasterLayer(iD!!, mSourceID!!)
13
+ }
14
+
15
+ override fun addStyles() {
16
+ RCTMGLStyleFactory.setRasterLayerStyle(mLayer, RCTMGLStyle(context, mReactStyle, mMap!!))
17
+ }
18
+ }
@@ -0,0 +1,65 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import com.facebook.react.bridge.ReadableMap
4
+ import com.facebook.react.uimanager.ThemedReactContext
5
+ import com.facebook.react.uimanager.ViewGroupManager
6
+ import com.facebook.react.uimanager.annotations.ReactProp
7
+
8
+ class RCTMGLRasterLayerManager : ViewGroupManager<RCTMGLRasterLayer>() {
9
+ override fun getName(): String {
10
+ return REACT_CLASS
11
+ }
12
+
13
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLRasterLayer {
14
+ return RCTMGLRasterLayer(reactContext)
15
+ }
16
+
17
+ @ReactProp(name = "id")
18
+ fun setId(layer: RCTMGLRasterLayer, id: String?) {
19
+ layer.iD = id
20
+ }
21
+
22
+ @ReactProp(name = "existing")
23
+ fun setExisting(layer: RCTMGLRasterLayer, existing: Boolean) {
24
+ layer.setExisting(existing)
25
+ }
26
+
27
+ @ReactProp(name = "sourceID")
28
+ fun setSourceID(layer: RCTMGLRasterLayer, sourceID: String?) {
29
+ layer.setSourceID(sourceID)
30
+ }
31
+
32
+ @ReactProp(name = "aboveLayerID")
33
+ fun setAboveLayerID(layer: RCTMGLRasterLayer, aboveLayerID: String?) {
34
+ layer.setAboveLayerID(aboveLayerID)
35
+ }
36
+
37
+ @ReactProp(name = "belowLayerID")
38
+ fun setBelowLayerID(layer: RCTMGLRasterLayer, belowLayerID: String?) {
39
+ layer.setBelowLayerID(belowLayerID)
40
+ }
41
+
42
+ @ReactProp(name = "layerIndex")
43
+ fun setLayerIndex(layer: RCTMGLRasterLayer, layerIndex: Int) {
44
+ layer.setLayerIndex(layerIndex)
45
+ }
46
+
47
+ @ReactProp(name = "minZoomLevel")
48
+ fun setMinZoomLevel(layer: RCTMGLRasterLayer, minZoomLevel: Double) {
49
+ layer.setMinZoomLevel(minZoomLevel)
50
+ }
51
+
52
+ @ReactProp(name = "maxZoomLevel")
53
+ fun setMaxZoomLevel(layer: RCTMGLRasterLayer, maxZoomLevel: Double) {
54
+ layer.setMaxZoomLevel(maxZoomLevel)
55
+ }
56
+
57
+ @ReactProp(name = "reactStyle")
58
+ fun setReactStyle(layer: RCTMGLRasterLayer, style: ReadableMap?) {
59
+ layer.setReactStyle(style)
60
+ }
61
+
62
+ companion object {
63
+ const val REACT_CLASS = "RCTMGLRasterLayer"
64
+ }
65
+ }
@@ -0,0 +1,76 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import com.facebook.react.bridge.ReadableArray
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.facebook.react.uimanager.ThemedReactContext
6
+ import com.facebook.react.uimanager.ViewGroupManager
7
+ import com.facebook.react.uimanager.annotations.ReactProp
8
+
9
+ class RCTMGLSkyLayerManager : ViewGroupManager<RCTMGLSkyLayer>() {
10
+ override fun getName(): String {
11
+ return REACT_CLASS
12
+ }
13
+
14
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLSkyLayer {
15
+ return RCTMGLSkyLayer(reactContext)
16
+ }
17
+
18
+ @ReactProp(name = "id")
19
+ fun setId(layer: RCTMGLSkyLayer, id: String?) {
20
+ layer.iD = id
21
+ }
22
+
23
+ @ReactProp(name = "existing")
24
+ fun setExisting(layer: RCTMGLSkyLayer, existing: Boolean) {
25
+ layer.setExisting(existing)
26
+ }
27
+
28
+ @ReactProp(name = "sourceID")
29
+ fun setSourceID(layer: RCTMGLSkyLayer, sourceID: String?) {
30
+ layer.setSourceID(sourceID)
31
+ }
32
+
33
+ @ReactProp(name = "aboveLayerID")
34
+ fun setAboveLayerID(layer: RCTMGLLineLayer, aboveLayerID: String?) {
35
+ layer.setAboveLayerID(aboveLayerID)
36
+ }
37
+
38
+ @ReactProp(name = "belowLayerID")
39
+ fun setBelowLayerID(layer: RCTMGLLineLayer, belowLayerID: String?) {
40
+ layer.setBelowLayerID(belowLayerID)
41
+ }
42
+
43
+ @ReactProp(name = "layerIndex")
44
+ fun setLayerIndex(layer: RCTMGLLineLayer, layerIndex: Int) {
45
+ layer.setLayerIndex(layerIndex)
46
+ }
47
+
48
+ @ReactProp(name = "minZoomLevel")
49
+ fun setMinZoomLevel(layer: RCTMGLLineLayer, minZoomLevel: Double) {
50
+ layer.setMinZoomLevel(minZoomLevel)
51
+ }
52
+
53
+ @ReactProp(name = "maxZoomLevel")
54
+ fun setMaxZoomLevel(layer: RCTMGLSkyLayer, maxZoomLevel: Double) {
55
+ layer.setMaxZoomLevel(maxZoomLevel)
56
+ }
57
+
58
+ @ReactProp(name = "reactStyle")
59
+ fun setReactStyle(layer: RCTMGLSkyLayer, style: ReadableMap?) {
60
+ layer.setReactStyle(style)
61
+ }
62
+
63
+ @ReactProp(name = "sourceLayerID")
64
+ fun setSourceLayerId(layer: RCTMGLSkyLayer, sourceLayerID: String?) {
65
+ layer.setSourceLayerID(sourceLayerID)
66
+ }
67
+
68
+ @ReactProp(name = "filter")
69
+ fun setFilter(layer: RCTMGLSkyLayer, filterList: ReadableArray?) {
70
+ layer.setFilter(filterList)
71
+ }
72
+
73
+ companion object {
74
+ const val REACT_CLASS = "RCTMGLSkyLayer"
75
+ }
76
+ }
@@ -0,0 +1,40 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import android.content.Context
4
+ import com.mapbox.maps.extension.style.expressions.generated.Expression
5
+ import com.mapbox.maps.extension.style.layers.generated.SymbolLayer
6
+ import com.mapbox.rctmgl.components.mapview.RCTMGLMapView
7
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyle
8
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory
9
+
10
+ class RCTMGLSymbolLayer(context: Context?) : RCTLayer<SymbolLayer?>(
11
+ context!!
12
+ ) {
13
+ private var mSourceLayerID: String? = null
14
+ override fun updateFilter(expression: Expression?) {
15
+ mLayer!!.filter(expression!!)
16
+ }
17
+
18
+ override fun addToMap(mapView: RCTMGLMapView) {
19
+ super.addToMap(mapView)
20
+ }
21
+
22
+ override fun makeLayer(): SymbolLayer {
23
+ val layer = SymbolLayer(iD!!, mSourceID!!)
24
+ if (mSourceLayerID != null) {
25
+ layer.sourceLayer(mSourceLayerID!!)
26
+ }
27
+ return layer
28
+ }
29
+
30
+ override fun addStyles() {
31
+ RCTMGLStyleFactory.setSymbolLayerStyle(mLayer, RCTMGLStyle(context, mReactStyle, mMap!!))
32
+ }
33
+
34
+ fun setSourceLayerID(sourceLayerID: String?) {
35
+ mSourceLayerID = sourceLayerID
36
+ if (mLayer != null) {
37
+ mLayer!!.sourceLayer(sourceLayerID!!)
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,76 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import com.facebook.react.bridge.ReadableArray
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.facebook.react.uimanager.ThemedReactContext
6
+ import com.facebook.react.uimanager.ViewGroupManager
7
+ import com.facebook.react.uimanager.annotations.ReactProp
8
+
9
+ class RCTMGLSymbolLayerManager : ViewGroupManager<RCTMGLSymbolLayer>() {
10
+ override fun getName(): String {
11
+ return REACT_CLASS
12
+ }
13
+
14
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLSymbolLayer {
15
+ return RCTMGLSymbolLayer(reactContext)
16
+ }
17
+
18
+ @ReactProp(name = "id")
19
+ fun setId(layer: RCTMGLSymbolLayer, id: String?) {
20
+ layer.iD = id
21
+ }
22
+
23
+ @ReactProp(name = "existing")
24
+ fun setExisting(layer: RCTMGLSymbolLayer, existing: Boolean) {
25
+ layer.setExisting(existing)
26
+ }
27
+
28
+ @ReactProp(name = "sourceID")
29
+ fun setSourceID(layer: RCTMGLSymbolLayer, sourceID: String?) {
30
+ layer.setSourceID(sourceID)
31
+ }
32
+
33
+ @ReactProp(name = "aboveLayerID")
34
+ fun setAboveLayerID(layer: RCTMGLSymbolLayer, aboveLayerID: String?) {
35
+ layer.setAboveLayerID(aboveLayerID)
36
+ }
37
+
38
+ @ReactProp(name = "belowLayerID")
39
+ fun setBelowLayerID(layer: RCTMGLSymbolLayer, belowLayerID: String?) {
40
+ layer.setBelowLayerID(belowLayerID)
41
+ }
42
+
43
+ @ReactProp(name = "layerIndex")
44
+ fun setLayerIndex(layer: RCTMGLSymbolLayer, layerIndex: Int) {
45
+ layer.setLayerIndex(layerIndex)
46
+ }
47
+
48
+ @ReactProp(name = "minZoomLevel")
49
+ fun setMinZoomLevel(layer: RCTMGLSymbolLayer, minZoomLevel: Double) {
50
+ layer.setMinZoomLevel(minZoomLevel)
51
+ }
52
+
53
+ @ReactProp(name = "maxZoomLevel")
54
+ fun setMaxZoomLevel(layer: RCTMGLSymbolLayer, maxZoomLevel: Double) {
55
+ layer.setMaxZoomLevel(maxZoomLevel)
56
+ }
57
+
58
+ @ReactProp(name = "reactStyle")
59
+ fun setReactStyle(layer: RCTMGLSymbolLayer, style: ReadableMap?) {
60
+ layer.setReactStyle(style)
61
+ }
62
+
63
+ @ReactProp(name = "sourceLayerID")
64
+ fun setSourceLayerId(layer: RCTMGLSymbolLayer, sourceLayerID: String?) {
65
+ layer.setSourceLayerID(sourceLayerID)
66
+ }
67
+
68
+ @ReactProp(name = "filter")
69
+ fun setFilter(layer: RCTMGLSymbolLayer, filterList: ReadableArray?) {
70
+ layer.setFilter(filterList)
71
+ }
72
+
73
+ companion object {
74
+ const val REACT_CLASS = "RCTMGLSymbolLayer"
75
+ }
76
+ }
@@ -7,6 +7,7 @@ import com.mapbox.maps.MapboxMap
7
7
  import com.facebook.react.bridge.ReadableMap
8
8
  import com.mapbox.maps.Style
9
9
  import com.mapbox.maps.extension.style.light.generated.Light
10
+ import com.mapbox.rctmgl.components.RemovalReason
10
11
  import com.mapbox.rctmgl.components.mapview.RCTMGLMapView
11
12
  import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory
12
13
  import com.mapbox.rctmgl.components.styles.RCTMGLStyle
@@ -15,12 +16,14 @@ class RCTMGLLight(context: Context?) : AbstractMapFeature(context) {
15
16
  private var mMap: MapboxMap? = null
16
17
  private var mReactStyle: ReadableMap? = null
17
18
  override fun addToMap(mapView: RCTMGLMapView) {
19
+ super.addToMap(mapView)
18
20
  mMap = mapView.getMapboxMap()
19
21
  setLight()
20
22
  }
21
23
 
22
- override fun removeFromMap(mapView: RCTMGLMapView) {
24
+ override fun removeFromMap(mapView: RCTMGLMapView, reason: RemovalReason): Boolean {
23
25
  // ignore there's nothing to remove just update the light style
26
+ return super.removeFromMap(mapView, reason)
24
27
  }
25
28
 
26
29
  fun setReactStyle(reactStyle: ReadableMap?) {
@@ -0,0 +1,69 @@
1
+ package com.mapbox.rctmgl.components.styles.sources
2
+
3
+ import android.content.Context
4
+ import android.net.Uri
5
+ import android.util.Log
6
+ import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper
7
+ import com.mapbox.maps.extension.style.sources.generated.ImageSource
8
+ import com.mapbox.rctmgl.utils.LatLngQuad
9
+ import java.net.URL
10
+
11
+ class RCTMGLImageSource(context: Context?) : RCTSource<ImageSource?>(context) {
12
+ private var mURL: URL? = null
13
+ private var mResourceId = 0
14
+ private var mCoordQuad: LatLngQuad? = null
15
+
16
+ override fun hasNoDataSoRefersToExisting(): Boolean {
17
+ return mURL == null
18
+ }
19
+
20
+ override fun makeSource(): ImageSource? {
21
+ if (mURL == null) {
22
+ throw RuntimeException("ImageSource without URL not supported in v10, resourceId is not supported")
23
+ }
24
+ val id = iD;
25
+ if (id == null) {
26
+ throw RuntimeException("ImageSource without ID not supported in v10")
27
+ }
28
+ return ImageSource.Builder(id).coordinates(mCoordQuad!!.coordinates).url(mURL.toString()).build()
29
+ }
30
+
31
+ override fun onPress(feature: OnPressEvent?) {
32
+ // ignore, we cannot query raster layers
33
+ }
34
+
35
+ fun setURL(url: String?) {
36
+ try {
37
+ val uri = Uri.parse(url)
38
+ if (uri.scheme == null) {
39
+ mResourceId =
40
+ ResourceDrawableIdHelper.getInstance().getResourceDrawableId(this.context, url)
41
+ if (mSource != null) {
42
+ throw RuntimeException("ImageSource Resource id not supported in v10")
43
+ }
44
+ } else {
45
+ mURL = URL(url)
46
+ if (mSource != null) {
47
+ mSource!!.url(mURL.toString())
48
+ }
49
+ }
50
+ } catch (e: Exception) {
51
+ Log.w(LOG_TAG, e.localizedMessage)
52
+ }
53
+ }
54
+
55
+ fun setCoordinates(coordQuad: LatLngQuad?) {
56
+ mCoordQuad = coordQuad
57
+ try {
58
+ if (mSource != null) {
59
+ mSource!!.coordinates(mCoordQuad!!.coordinates)
60
+ }
61
+ } catch (e: Exception) {
62
+ Log.w(LOG_TAG, e.localizedMessage)
63
+ }
64
+ }
65
+
66
+ companion object {
67
+ const val LOG_TAG = "RCTMGLImageSource"
68
+ }
69
+ }
@@ -0,0 +1,54 @@
1
+ package com.mapbox.rctmgl.components.styles.sources
2
+
3
+ import android.view.View
4
+ import com.facebook.react.bridge.ReadableArray
5
+ import com.facebook.react.uimanager.ThemedReactContext
6
+ import com.facebook.react.uimanager.ViewGroupManager
7
+ import com.facebook.react.uimanager.annotations.ReactProp
8
+ import com.mapbox.rctmgl.utils.GeoJSONUtils.toLatLngQuad
9
+
10
+ class RCTMGLImageSourceManager : ViewGroupManager<RCTMGLImageSource>() {
11
+ override fun getName(): String {
12
+ return REACT_CLASS
13
+ }
14
+
15
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLImageSource {
16
+ return RCTMGLImageSource(reactContext)
17
+ }
18
+
19
+ override fun getChildAt(source: RCTMGLImageSource, childPosition: Int): View {
20
+ return source.getChildAt(childPosition)
21
+ }
22
+
23
+ override fun getChildCount(source: RCTMGLImageSource): Int {
24
+ return source.childCount
25
+ }
26
+
27
+ override fun addView(source: RCTMGLImageSource, childView: View, childPosition: Int) {
28
+ source.addLayer(childView, childPosition)
29
+ }
30
+
31
+ override fun removeViewAt(source: RCTMGLImageSource, childPosition: Int) {
32
+ source.removeLayer(childPosition)
33
+ }
34
+
35
+ @ReactProp(name = "id")
36
+ fun setId(source: RCTMGLImageSource, id: String?) {
37
+ source.iD = id
38
+ }
39
+
40
+ @ReactProp(name = "url")
41
+ fun setUrl(source: RCTMGLImageSource, url: String?) {
42
+ source.setURL(url)
43
+ }
44
+
45
+ @ReactProp(name = "coordinates")
46
+ fun setCoordinates(source: RCTMGLImageSource, arr: ReadableArray?) {
47
+ val quad = toLatLngQuad(arr) ?: return
48
+ source.setCoordinates(quad)
49
+ }
50
+
51
+ companion object {
52
+ const val REACT_CLASS = "RCTMGLImageSource"
53
+ }
54
+ }