@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
@@ -16,7 +16,9 @@ import com.mapbox.maps.extension.style.expressions.dsl.generated.literal
16
16
  import com.mapbox.maps.extension.style.expressions.generated.Expression
17
17
  import com.mapbox.maps.extension.style.layers.*
18
18
  import com.mapbox.maps.extension.style.layers.properties.generated.Visibility
19
+ import com.mapbox.rctmgl.components.RemovalReason
19
20
  import com.mapbox.rctmgl.components.styles.layers.RCTLayer
21
+ import com.mapbox.rctmgl.components.styles.sources.RCTSource
20
22
  import com.mapbox.rctmgl.modules.RCTMGLLogging
21
23
  import com.mapbox.rctmgl.utils.ExpressionParser
22
24
  import java.lang.ClassCastException
@@ -43,17 +45,26 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
43
45
  protected var mLayer: T? = null
44
46
  protected var mHadFilter = false
45
47
 
48
+ protected var mExisting : Boolean? = null
49
+
46
50
  fun setSourceID(sourceID: String?) {
47
51
  mSourceID = sourceID
48
52
  }
49
53
 
54
+ fun checkID(): String? {
55
+ if (iD == null) {
56
+ Logger.w(LOG_TAG, "iD is null in layer")
57
+ }
58
+ return iD;
59
+ }
60
+
50
61
  fun setAboveLayerID(aboveLayerID: String?) {
51
62
  if (mAboveLayerID != null && mAboveLayerID == aboveLayerID) {
52
63
  return
53
64
  }
54
65
  mAboveLayerID = aboveLayerID
55
66
  if (mLayer != null) {
56
- removeFromMap(mMapView!!)
67
+ removeFromMap(mMapView!!, RemovalReason.REORDER)
57
68
  addAbove(mAboveLayerID)
58
69
  }
59
70
  }
@@ -64,7 +75,7 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
64
75
  }
65
76
  mBelowLayerID = belowLayerID
66
77
  if (mLayer != null) {
67
- removeFromMap(mMapView!!)
78
+ removeFromMap(mMapView!!,RemovalReason.REORDER)
68
79
  addBelow(mBelowLayerID)
69
80
  }
70
81
  }
@@ -75,8 +86,8 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
75
86
  }
76
87
  mLayerIndex = layerIndex
77
88
  if (mLayer != null) {
78
- removeFromMap(mMapView!!)
79
- addAtIndex(mLayerIndex!!)
89
+ removeFromMap(mMapView!!,RemovalReason.REORDER)
90
+ addAtIndex(layerIndex)
80
91
  }
81
92
  }
82
93
 
@@ -121,6 +132,10 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
121
132
  }
122
133
  }
123
134
 
135
+ fun setExisting(existing: Boolean) {
136
+ mExisting = existing
137
+ }
138
+
124
139
  fun add() {
125
140
  if (!hasInitialized()) {
126
141
  return
@@ -175,7 +190,7 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
175
190
  if (!hasInitialized()) {
176
191
  return
177
192
  }
178
- if (style == null) return
193
+ val style = this.style ?: return
179
194
  val layerSize = style!!.styleLayers.size
180
195
  if (index >= layerSize) {
181
196
  FLog.e(
@@ -184,13 +199,16 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
184
199
  )
185
200
  index = layerSize - 1
186
201
  }
187
- style!!.addLayerAt(mLayer!!, index)
188
- mMapView!!.layerAdded(mLayer!!)
202
+ val layer = mLayer ?: return
203
+ val mapView = mMapView ?: return
204
+ style.addLayerAt(layer, index)
205
+ mapView.layerAdded(layer)
189
206
  }
190
207
 
191
208
  protected fun insertLayer() {
192
- if (style == null) return
193
- if (style!!.getLayer(iD!!) != null) {
209
+ val style = this.style ?: return
210
+ val id = checkID() ?: return
211
+ if (style.styleLayerExists(id)) {
194
212
  return // prevent adding a layer twice
195
213
  }
196
214
  if (mAboveLayerID != null) {
@@ -218,8 +236,8 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
218
236
  // override if you want to update the filter
219
237
  }
220
238
 
221
- private fun getLayerAs(style: Style?, id: String?): T? {
222
- val result = style!!.getLayer(iD!!)
239
+ private fun getLayerAs(style: Style, id: String?): T? {
240
+ val result = style.getLayer(iD!!)
223
241
  return try {
224
242
  result as T?
225
243
  } catch (exception: ClassCastException) {
@@ -230,14 +248,24 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
230
248
  override fun addToMap(mapView: RCTMGLMapView) {
231
249
  super.addToMap(mapView)
232
250
  mMap = mapView.getMapboxMap()
233
- if (style == null) return
234
- val existingLayer = getLayerAs(style, iD)
251
+ val style = style ?: return
252
+ val id = checkID() ?: return
253
+
254
+ val exists = style.styleLayerExists(id)
255
+ var existingLayer: T? = null;
256
+ if (exists) {
257
+ if (mExisting == null) {
258
+ Logger.e(LOG_TAG, "Layer $id seems to refer to an existing layer but existing flag is not specified, this is deprecated")
259
+ }
260
+ existingLayer = getLayerAs(style, id)
261
+ }
235
262
  if (existingLayer != null) {
236
263
  mLayer = existingLayer
237
264
  } else {
238
265
  mLayer = makeLayer()
239
266
  insertLayer()
240
267
  }
268
+
241
269
  addStyles()
242
270
  if (mFilter != null) {
243
271
  mHadFilter = true
@@ -245,7 +273,7 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
245
273
  }
246
274
  }
247
275
 
248
- override fun removeFromMap(mapView: RCTMGLMapView) {
276
+ override fun removeFromMap(mapView: RCTMGLMapView, reason: RemovalReason): Boolean {
249
277
  style?.let {
250
278
  val layer = mLayer
251
279
  if (layer != null) {
@@ -254,7 +282,7 @@ abstract class RCTLayer<T : Layer?>(protected var mContext: Context) : AbstractS
254
282
  Logger.e("RCTLayer","mLayer is null on removal layer from map")
255
283
  }
256
284
  }
257
- super.removeFromMap(mapView)
285
+ return super.removeFromMap(mapView, reason)
258
286
  }
259
287
 
260
288
  private val style: Style?
@@ -0,0 +1,21 @@
1
+ package com.mapbox.rctmgl.components.styles.layers
2
+
3
+ import android.content.Context
4
+ import com.mapbox.maps.extension.style.layers.generated.BackgroundLayer
5
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyle
6
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory
7
+
8
+ class RCTMGLBackgroundLayer(context: Context?) : RCTLayer<BackgroundLayer?>(
9
+ context!!
10
+ ) {
11
+ override fun makeLayer(): BackgroundLayer {
12
+ return BackgroundLayer(iD!!)
13
+ }
14
+
15
+ override fun addStyles() {
16
+ RCTMGLStyleFactory.setBackgroundLayerStyle(
17
+ mLayer,
18
+ RCTMGLStyle(context, mReactStyle, mMap!!)
19
+ )
20
+ }
21
+ }
@@ -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 RCTMGLBackgroundLayerManager : ViewGroupManager<RCTMGLBackgroundLayer>() {
9
+ override fun getName(): String {
10
+ return REACT_CLASS
11
+ }
12
+
13
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLBackgroundLayer {
14
+ return RCTMGLBackgroundLayer(reactContext)
15
+ }
16
+
17
+ @ReactProp(name = "id")
18
+ fun setId(layer: RCTMGLBackgroundLayer, id: String?) {
19
+ layer.iD = id
20
+ }
21
+
22
+ @ReactProp(name = "existing")
23
+ fun setExisting(layer: RCTMGLBackgroundLayer, existing: Boolean) {
24
+ layer.setExisting(existing)
25
+ }
26
+
27
+ @ReactProp(name = "sourceID")
28
+ fun setSourceID(layer: RCTMGLBackgroundLayer, sourceID: String?) {
29
+ layer.setSourceID(sourceID)
30
+ }
31
+
32
+ @ReactProp(name = "aboveLayerID")
33
+ fun setAboveLayerID(layer: RCTMGLBackgroundLayer, aboveLayerID: String?) {
34
+ layer.setAboveLayerID(aboveLayerID)
35
+ }
36
+
37
+ @ReactProp(name = "belowLayerID")
38
+ fun setBelowLayerID(layer: RCTMGLBackgroundLayer, belowLayerID: String?) {
39
+ layer.setBelowLayerID(belowLayerID)
40
+ }
41
+
42
+ @ReactProp(name = "layerIndex")
43
+ fun setLayerIndex(layer: RCTMGLBackgroundLayer, layerIndex: Int) {
44
+ layer.setLayerIndex(layerIndex)
45
+ }
46
+
47
+ @ReactProp(name = "minZoomLevel")
48
+ fun setMinZoomLevel(layer: RCTMGLBackgroundLayer, minZoomLevel: Double) {
49
+ layer.setMinZoomLevel(minZoomLevel)
50
+ }
51
+
52
+ @ReactProp(name = "maxZoomLevel")
53
+ fun setMaxZoomLevel(layer: RCTMGLBackgroundLayer, maxZoomLevel: Double) {
54
+ layer.setMaxZoomLevel(maxZoomLevel)
55
+ }
56
+
57
+ @ReactProp(name = "reactStyle")
58
+ fun setReactStyle(layer: RCTMGLBackgroundLayer, style: ReadableMap?) {
59
+ layer.setReactStyle(style)
60
+ }
61
+
62
+ companion object {
63
+ const val REACT_CLASS = "RCTMGLBackgroundLayer"
64
+ }
65
+ }
@@ -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.CircleLayer
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 RCTMGLCircleLayer(context: Context?) : RCTLayer<CircleLayer?>(
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(): CircleLayer {
23
+ val layer = CircleLayer(iD!!, mSourceID!!)
24
+ if (mSourceLayerID != null) {
25
+ layer.sourceLayer(mSourceLayerID!!)
26
+ }
27
+ return layer
28
+ }
29
+
30
+ override fun addStyles() {
31
+ RCTMGLStyleFactory.setCircleLayerStyle(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 RCTMGLCircleLayerManager : ViewGroupManager<RCTMGLCircleLayer>() {
10
+ override fun getName(): String {
11
+ return REACT_CLASS
12
+ }
13
+
14
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLCircleLayer {
15
+ return RCTMGLCircleLayer(reactContext)
16
+ }
17
+
18
+ @ReactProp(name = "id")
19
+ fun setId(layer: RCTMGLCircleLayer, id: String?) {
20
+ layer.iD = id
21
+ }
22
+
23
+ @ReactProp(name = "existing")
24
+ fun setExisting(layer: RCTMGLCircleLayer, existing: Boolean) {
25
+ layer.setExisting(existing)
26
+ }
27
+
28
+ @ReactProp(name = "sourceID")
29
+ fun setSourceID(layer: RCTMGLCircleLayer, sourceID: String?) {
30
+ layer.setSourceID(sourceID)
31
+ }
32
+
33
+ @ReactProp(name = "aboveLayerID")
34
+ fun setAboveLayerID(layer: RCTMGLCircleLayer, aboveLayerID: String?) {
35
+ layer.setAboveLayerID(aboveLayerID)
36
+ }
37
+
38
+ @ReactProp(name = "belowLayerID")
39
+ fun setBelowLayerID(layer: RCTMGLCircleLayer, belowLayerID: String?) {
40
+ layer.setBelowLayerID(belowLayerID)
41
+ }
42
+
43
+ @ReactProp(name = "layerIndex")
44
+ fun setLayerIndex(layer: RCTMGLCircleLayer, layerIndex: Int) {
45
+ layer.setLayerIndex(layerIndex)
46
+ }
47
+
48
+ @ReactProp(name = "minZoomLevel")
49
+ fun setMinZoomLevel(layer: RCTMGLCircleLayer, minZoomLevel: Double) {
50
+ layer.setMinZoomLevel(minZoomLevel)
51
+ }
52
+
53
+ @ReactProp(name = "maxZoomLevel")
54
+ fun setMaxZoomLevel(layer: RCTMGLCircleLayer, maxZoomLevel: Double) {
55
+ layer.setMaxZoomLevel(maxZoomLevel)
56
+ }
57
+
58
+ @ReactProp(name = "reactStyle")
59
+ fun setReactStyle(layer: RCTMGLCircleLayer, style: ReadableMap?) {
60
+ layer.setReactStyle(style)
61
+ }
62
+
63
+ @ReactProp(name = "sourceLayerID")
64
+ fun setSourceLayerId(layer: RCTMGLCircleLayer, sourceLayerID: String?) {
65
+ layer.setSourceLayerID(sourceLayerID)
66
+ }
67
+
68
+ @ReactProp(name = "filter")
69
+ fun setFilter(layer: RCTMGLCircleLayer, filterList: ReadableArray?) {
70
+ layer.setFilter(filterList)
71
+ }
72
+
73
+ companion object {
74
+ const val REACT_CLASS = "RCTMGLCircleLayer"
75
+ }
76
+ }
@@ -0,0 +1,43 @@
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.FillExtrusionLayer
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 RCTMGLFillExtrusionLayer(context: Context?) : RCTLayer<FillExtrusionLayer?>(
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(): FillExtrusionLayer {
23
+ val layer = FillExtrusionLayer(iD!!, mSourceID!!)
24
+ if (mSourceLayerID != null) {
25
+ layer.sourceLayer(mSourceLayerID!!)
26
+ }
27
+ return layer
28
+ }
29
+
30
+ override fun addStyles() {
31
+ RCTMGLStyleFactory.setFillExtrusionLayerStyle(
32
+ mLayer,
33
+ RCTMGLStyle(context, mReactStyle, mMap!!)
34
+ )
35
+ }
36
+
37
+ fun setSourceLayerID(sourceLayerID: String?) {
38
+ mSourceLayerID = sourceLayerID
39
+ if (mLayer != null) {
40
+ mLayer!!.sourceLayer(mSourceLayerID!!)
41
+ }
42
+ }
43
+ }
@@ -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 RCTMGLFillExtrusionLayerManager : ViewGroupManager<RCTMGLFillExtrusionLayer>() {
10
+ override fun getName(): String {
11
+ return REACT_CLASS
12
+ }
13
+
14
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLFillExtrusionLayer {
15
+ return RCTMGLFillExtrusionLayer(reactContext)
16
+ }
17
+
18
+ @ReactProp(name = "id")
19
+ fun setId(layer: RCTMGLFillExtrusionLayer, id: String?) {
20
+ layer.iD = id
21
+ }
22
+
23
+ @ReactProp(name = "existing")
24
+ fun setExisting(layer: RCTMGLFillExtrusionLayer, existing: Boolean) {
25
+ layer.setExisting(existing)
26
+ }
27
+
28
+ @ReactProp(name = "sourceID")
29
+ fun setSourceID(layer: RCTMGLFillExtrusionLayer, sourceID: String?) {
30
+ layer.setSourceID(sourceID)
31
+ }
32
+
33
+ @ReactProp(name = "aboveLayerID")
34
+ fun setAboveLayerID(layer: RCTMGLFillExtrusionLayer, aboveLayerID: String?) {
35
+ layer.setAboveLayerID(aboveLayerID)
36
+ }
37
+
38
+ @ReactProp(name = "belowLayerID")
39
+ fun setBelowLayerID(layer: RCTMGLFillExtrusionLayer, belowLayerID: String?) {
40
+ layer.setBelowLayerID(belowLayerID)
41
+ }
42
+
43
+ @ReactProp(name = "layerIndex")
44
+ fun setLayerIndex(layer: RCTMGLFillExtrusionLayer, layerIndex: Int) {
45
+ layer.setLayerIndex(layerIndex)
46
+ }
47
+
48
+ @ReactProp(name = "minZoomLevel")
49
+ fun setMinZoomLevel(layer: RCTMGLFillExtrusionLayer, minZoomLevel: Double) {
50
+ layer.setMinZoomLevel(minZoomLevel)
51
+ }
52
+
53
+ @ReactProp(name = "maxZoomLevel")
54
+ fun setMaxZoomLevel(layer: RCTMGLFillExtrusionLayer, maxZoomLevel: Double) {
55
+ layer.setMaxZoomLevel(maxZoomLevel)
56
+ }
57
+
58
+ @ReactProp(name = "reactStyle")
59
+ fun setReactStyle(layer: RCTMGLFillExtrusionLayer, style: ReadableMap?) {
60
+ layer.setReactStyle(style)
61
+ }
62
+
63
+ @ReactProp(name = "sourceLayerID")
64
+ fun setSourceLayerId(layer: RCTMGLFillExtrusionLayer, sourceLayerID: String?) {
65
+ layer.setSourceLayerID(sourceLayerID)
66
+ }
67
+
68
+ @ReactProp(name = "filter")
69
+ fun setFilter(layer: RCTMGLFillExtrusionLayer, filterList: ReadableArray?) {
70
+ layer.setFilter(filterList)
71
+ }
72
+
73
+ companion object {
74
+ const val REACT_CLASS = "RCTMGLFillExtrusionLayer"
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.FillLayer
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 RCTMGLFillLayer(context: Context?) : RCTLayer<FillLayer?>(
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(): FillLayer {
23
+ val layer = FillLayer(iD!!, mSourceID!!)
24
+ if (mSourceLayerID != null) {
25
+ layer.sourceLayer(mSourceLayerID!!)
26
+ }
27
+ return layer
28
+ }
29
+
30
+ override fun addStyles() {
31
+ RCTMGLStyleFactory.setFillLayerStyle(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 RCTMGLFillLayerManager : ViewGroupManager<RCTMGLFillLayer>() {
10
+ override fun getName(): String {
11
+ return REACT_CLASS
12
+ }
13
+
14
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLFillLayer {
15
+ return RCTMGLFillLayer(reactContext)
16
+ }
17
+
18
+ @ReactProp(name = "id")
19
+ fun setId(layer: RCTMGLFillLayer, id: String?) {
20
+ layer.iD = id
21
+ }
22
+
23
+ @ReactProp(name = "existing")
24
+ fun setExisting(layer: RCTMGLFillLayer, existing: Boolean) {
25
+ layer.setExisting(existing)
26
+ }
27
+
28
+ @ReactProp(name = "sourceID")
29
+ fun setSourceID(layer: RCTMGLFillLayer, sourceID: String?) {
30
+ layer.setSourceID(sourceID)
31
+ }
32
+
33
+ @ReactProp(name = "sourceLayerID")
34
+ fun setSourceLayerId(layer: RCTMGLFillLayer, sourceLayerID: String?) {
35
+ layer.setSourceLayerID(sourceLayerID)
36
+ }
37
+
38
+ @ReactProp(name = "aboveLayerID")
39
+ fun setAboveLayerID(layer: RCTMGLFillLayer, aboveLayerID: String?) {
40
+ layer.setAboveLayerID(aboveLayerID)
41
+ }
42
+
43
+ @ReactProp(name = "belowLayerID")
44
+ fun setBelowLayerID(layer: RCTMGLFillLayer, belowLayerID: String?) {
45
+ layer.setBelowLayerID(belowLayerID)
46
+ }
47
+
48
+ @ReactProp(name = "layerIndex")
49
+ fun setLayerIndex(layer: RCTMGLFillLayer, layerIndex: Int) {
50
+ layer.setLayerIndex(layerIndex)
51
+ }
52
+
53
+ @ReactProp(name = "minZoomLevel")
54
+ fun setMinZoomLevel(layer: RCTMGLFillLayer, minZoomLevel: Double) {
55
+ layer.setMinZoomLevel(minZoomLevel)
56
+ }
57
+
58
+ @ReactProp(name = "maxZoomLevel")
59
+ fun setMaxZoomLevel(layer: RCTMGLFillLayer, maxZoomLevel: Double) {
60
+ layer.setMaxZoomLevel(maxZoomLevel)
61
+ }
62
+
63
+ @ReactProp(name = "reactStyle")
64
+ fun setReactStyle(layer: RCTMGLFillLayer, style: ReadableMap?) {
65
+ layer.setReactStyle(style)
66
+ }
67
+
68
+ @ReactProp(name = "filter")
69
+ fun setFilter(layer: RCTMGLFillLayer, filterList: ReadableArray?) {
70
+ layer.setFilter(filterList)
71
+ }
72
+
73
+ companion object {
74
+ const val REACT_CLASS = "RCTMGLFillLayer"
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.HeatmapLayer
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 RCTMGLHeatmapLayer(context: Context?) : RCTLayer<HeatmapLayer?>(
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(): HeatmapLayer {
23
+ val layer = HeatmapLayer(iD!!, mSourceID!!)
24
+ if (mSourceLayerID != null) {
25
+ layer.sourceLayer(mSourceLayerID!!)
26
+ }
27
+ return layer
28
+ }
29
+
30
+ override fun addStyles() {
31
+ RCTMGLStyleFactory.setHeatmapLayerStyle(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
+ }