@rnmapbox/maps 10.0.0-beta.60 → 10.0.0-beta.61

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 (35) hide show
  1. package/android/rctmgl/build.gradle +1 -1
  2. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +2 -1
  3. package/index.d.ts +7 -0
  4. package/ios/RCTMGL-v10/MGLModule.swift +1 -0
  5. package/ios/RCTMGL-v10/RCTMGLAtmosphere.swift +3 -2
  6. package/ios/RCTMGL-v10/RCTMGLCircleLayer.swift +3 -3
  7. package/ios/RCTMGL-v10/RCTMGLEvent.swift +1 -0
  8. package/ios/RCTMGL-v10/RCTMGLFillExtrustionLayer.swift +4 -4
  9. package/ios/RCTMGL-v10/RCTMGLFillLayer.swift +4 -3
  10. package/ios/RCTMGL-v10/RCTMGLHeatmapLayer.swift +5 -4
  11. package/ios/RCTMGL-v10/RCTMGLMapView.swift +27 -2
  12. package/ios/RCTMGL-v10/RCTMGLRasterLayer.swift +3 -2
  13. package/ios/RCTMGL-v10/RCTMGLSymbolLayer.swift +1 -1
  14. package/ios/RCTMGL-v10/RCTMGLTerrain.swift +3 -2
  15. package/javascript/index.js +3 -0
  16. package/javascript/utils/{filterUtils.tsx → filterUtils.ts} +0 -0
  17. package/javascript/utils/getAnnotationsLayerID.ts +16 -0
  18. package/lib/commonjs/index.js +8 -0
  19. package/lib/commonjs/index.js.map +1 -1
  20. package/lib/commonjs/utils/filterUtils.js.map +1 -1
  21. package/lib/commonjs/utils/getAnnotationsLayerID.js +21 -0
  22. package/lib/commonjs/utils/getAnnotationsLayerID.js.map +1 -0
  23. package/lib/module/index.js +3 -1
  24. package/lib/module/index.js.map +1 -1
  25. package/lib/module/utils/filterUtils.js.map +1 -1
  26. package/lib/module/utils/getAnnotationsLayerID.js +15 -0
  27. package/lib/module/utils/getAnnotationsLayerID.js.map +1 -0
  28. package/lib/typescript/utils/filterUtils.d.ts.map +1 -1
  29. package/lib/typescript/utils/getAnnotationsLayerID.d.ts +2 -0
  30. package/lib/typescript/utils/getAnnotationsLayerID.d.ts.map +1 -0
  31. package/package.json +2 -2
  32. package/plugin/build/withMapbox.d.ts +1 -1
  33. package/plugin/build/withMapbox.js +46 -59
  34. package/plugin/src/withMapbox.ts +62 -65
  35. package/rnmapbox-maps.podspec +1 -1
@@ -130,7 +130,7 @@ dependencies {
130
130
  implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.1.0'
131
131
  }
132
132
  else if (safeExtGet("RNMapboxMapsImpl", defaultMapboxMapsImpl) == "mapbox") {
133
- implementation 'com.mapbox.maps:android:10.9.1'
133
+ implementation 'com.mapbox.maps:android:10.10.0'
134
134
  implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:6.8.0'
135
135
  implementation 'androidx.asynclayoutinflater:asynclayoutinflater:1.0.0'
136
136
  }
@@ -29,6 +29,7 @@ import com.mapbox.maps.extension.style.layers.properties.generated.Visibility
29
29
  import com.mapbox.maps.extension.style.projection.generated.Projection
30
30
  import com.mapbox.maps.extension.style.projection.generated.setProjection
31
31
  import com.mapbox.maps.plugin.annotation.Annotation
32
+ import com.mapbox.maps.plugin.annotation.AnnotationConfig
32
33
  import com.mapbox.maps.plugin.annotation.annotations
33
34
  import com.mapbox.maps.plugin.annotation.generated.*
34
35
  import com.mapbox.maps.plugin.attribution.attribution
@@ -125,7 +126,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
125
126
  gesturesPlugin.removeOnMapClickListener(_this)
126
127
  gesturesPlugin.removeOnMapLongClickListener(_this)
127
128
 
128
- mPointAnnotationManager = annotations.createPointAnnotationManager()
129
+ mPointAnnotationManager = annotations.createPointAnnotationManager(AnnotationConfig(layerId = "rctmgl-mapview-annotations"))
129
130
  mPointAnnotationManager?.addClickListener(OnPointAnnotationClickListener { pointAnnotation ->
130
131
  onMarkerClick(pointAnnotation)
131
132
  false
package/index.d.ts CHANGED
@@ -26,6 +26,7 @@ import type {
26
26
  SymbolLayerStyleProps,
27
27
  LineLayerStyleProps,
28
28
  } from './javascript/utils/MapboxStyles';
29
+ import { getAnnotationsLayerID as _getAnnotationsLayerID } from './javascript/utils/getAnnotationsLayerID';
29
30
  import {
30
31
  Camera as _Camera,
31
32
  CameraStop as _CameraStop,
@@ -144,6 +145,9 @@ declare namespace MapboxGL {
144
145
 
145
146
  const requestAndroidLocationPermissions = _requestAndroidLocationPermissions;
146
147
 
148
+ const getAnnotationsLayerID = _getAnnotationsLayerID;
149
+ type getAnnotationsLayerID = _getAnnotationsLayerID;
150
+
147
151
  const Camera = _Camera;
148
152
  type Camera = _Camera;
149
153
  type CameraStop = _CameraStop;
@@ -944,6 +948,7 @@ export import RasterLayer = MapboxGL.RasterLayer;
944
948
  export import BackgroundLayer = MapboxGL.BackgroundLayer;
945
949
  export import MarkerView = MapboxGL.MarkerView;
946
950
  export import PointAnnotation = MapboxGL.PointAnnotation;
951
+ export import Callout = MapboxGL.Callout;
947
952
 
948
953
  export import MapboxGLEvent = MapboxGL.MapboxGLEvent;
949
954
  export import UserTrackingMode = MapboxGL.UserTrackingMode;
@@ -955,4 +960,6 @@ export import AnimatedShape = MapboxGL.AnimatedShape;
955
960
 
956
961
  export const { offlineManager } = MapboxGL;
957
962
 
963
+ export const { getAnnotationsLayerID } = MapboxGL;
964
+
958
965
  export default MapboxGL;
@@ -52,6 +52,7 @@ class MGLModule : NSObject {
52
52
  "RegionDidChange" : RCTMGLEvent.EventType.regionDidChange.rawValue,
53
53
  "CameraChanged" : RCTMGLEvent.EventType.cameraChanged.rawValue,
54
54
  "MapIdle" : RCTMGLEvent.EventType.mapIdle.rawValue,
55
+ "WillStartLoadingMap": RCTMGLEvent.EventType.willStartLoadingMap.rawValue,
55
56
  "DidFinishLoadingStyle": RCTMGLEvent.EventType.didFinishLoadingStyle.rawValue,
56
57
  "DidFinishLoadingMap": RCTMGLEvent.EventType.didFinishLoadingMap.rawValue,
57
58
  "DidFinishRenderingFrameFully": RCTMGLEvent.EventType.didFinishRenderingFully.rawValue,
@@ -47,14 +47,15 @@ class RCTMGLAtmosphere : RCTMGLSingletonLayer, RCTMGLMapComponent, RCTMGLSourceC
47
47
  }
48
48
 
49
49
  override func addStyles() {
50
- if let style : Style = self.style {
50
+ if let style : Style = self.style,
51
+ let reactStyle = self.reactStyle {
51
52
  let styler = RCTMGLStyle(style: style)
52
53
  styler.bridge = self.bridge
53
54
 
54
55
  if var atmosphere = atmosphere {
55
56
  styler.atmosphereLayer(
56
57
  layer: &atmosphere,
57
- reactStyle: reactStyle ?? [:],
58
+ reactStyle: reactStyle,
58
59
  applyUpdater: { (updater) in fatalError("Atmosphere: TODO - implement apply updater")},
59
60
  isValid: { fatalError("Atmosphere: TODO - no isValid") }
60
61
  )
@@ -26,11 +26,11 @@ class RCTMGLCircleLayer: RCTMGLVectorLayer {
26
26
  }
27
27
 
28
28
  override func addStyles() {
29
- if let style : Style = self.style {
29
+ if let style : Style = self.style,
30
+ let reactStyle = self.reactStyle {
30
31
  let styler = RCTMGLStyle(style: self.style!)
31
32
  styler.bridge = self.bridge
32
- if var styleLayer = self.styleLayer as? LayerType,
33
- let reactStyle = self.reactStyle {
33
+ if var styleLayer = self.styleLayer as? LayerType {
34
34
  styler.circleLayer(
35
35
  layer: &styleLayer,
36
36
  reactStyle: reactStyle,
@@ -31,6 +31,7 @@ class RCTMGLEvent : NSObject, RCTMGLEventProtocol {
31
31
  case didFinishRenderingFully
32
32
  case didFinishRendering
33
33
  case didFinishLoadingStyle
34
+ case willStartLoadingMap
34
35
  case offlineProgress
35
36
  case offlineError
36
37
  case offlineTileLimit
@@ -5,7 +5,7 @@ class RCTMGLFillExtrusionLayer: RCTMGLVectorLayer {
5
5
  typealias LayerType = FillExtrusionLayer
6
6
 
7
7
  override func makeLayer(style: Style) throws -> Layer {
8
- let vectorSource : VectorSource = try self.layerWithSourceID(in: style)
8
+ let _ : VectorSource = try self.layerWithSourceID(in: style)
9
9
  var layer = LayerType(id: self.id!)
10
10
  layer.sourceLayer = self.sourceLayerID
11
11
  layer.source = sourceID
@@ -25,11 +25,11 @@ class RCTMGLFillExtrusionLayer: RCTMGLVectorLayer {
25
25
  }
26
26
 
27
27
  override func addStyles() {
28
- if let style : Style = self.style {
28
+ if let style : Style = self.style,
29
+ let reactStyle = self.reactStyle {
29
30
  let styler = RCTMGLStyle(style: self.style!)
30
31
  styler.bridge = self.bridge
31
- if var styleLayer = self.styleLayer as? LayerType,
32
- let reactStyle = self.reactStyle {
32
+ if var styleLayer = self.styleLayer as? LayerType {
33
33
  styler.fillExtrusionLayer(
34
34
  layer: &styleLayer,
35
35
  reactStyle: reactStyle,
@@ -5,7 +5,7 @@ class RCTMGLFillLayer: RCTMGLVectorLayer {
5
5
  typealias LayerType = FillLayer
6
6
 
7
7
  override func makeLayer(style: Style) throws -> Layer {
8
- let vectorSource : VectorSource = try self.layerWithSourceID(in: style)
8
+ let _ : VectorSource = try self.layerWithSourceID(in: style)
9
9
  var layer: Layer = FillLayer(id: self.id!)
10
10
 
11
11
  setOptions(&layer)
@@ -26,14 +26,15 @@ class RCTMGLFillLayer: RCTMGLVectorLayer {
26
26
  }
27
27
 
28
28
  override func addStyles() {
29
- if let style : Style = self.style {
29
+ if let style : Style = self.style,
30
+ let reactStyle = reactStyle {
30
31
  let styler = RCTMGLStyle(style: self.style!)
31
32
  styler.bridge = self.bridge
32
33
 
33
34
  if var styleLayer = self.styleLayer as? FillLayer {
34
35
  styler.fillLayer(
35
36
  layer: &styleLayer,
36
- reactStyle: reactStyle ?? [:],
37
+ reactStyle: reactStyle,
37
38
  applyUpdater: { (updater) in logged("RCTMGLFillLayer.updateLayer") {
38
39
  try style.updateLayer(withId: self.id, type: LayerType.self) { (layer: inout FillLayer) in updater(&layer) }
39
40
  }},
@@ -5,7 +5,7 @@ class RCTMGLHeatmapLayer: RCTMGLVectorLayer {
5
5
  typealias LayerType = HeatmapLayer
6
6
 
7
7
  override func makeLayer(style: Style) throws -> Layer {
8
- let vectorSource : VectorSource = try self.layerWithSourceID(in: style)
8
+ let _ : VectorSource = try self.layerWithSourceID(in: style)
9
9
  var layer: Layer = LayerType(id: self.id!)
10
10
 
11
11
  setOptions(&layer)
@@ -26,14 +26,15 @@ class RCTMGLHeatmapLayer: RCTMGLVectorLayer {
26
26
  }
27
27
 
28
28
  override func addStyles() {
29
- if let style : Style = self.style {
30
- let styler = RCTMGLStyle(style: self.style!)
29
+ if let style : Style = self.style,
30
+ let reactStyle = reactStyle {
31
+ let styler = RCTMGLStyle(style: style)
31
32
  styler.bridge = self.bridge
32
33
 
33
34
  if var styleLayer = self.styleLayer as? HeatmapLayer {
34
35
  styler.heatmapLayer(
35
36
  layer: &styleLayer,
36
- reactStyle: reactStyle!,
37
+ reactStyle: reactStyle,
37
38
  applyUpdater: { (updater) in logged("RCTMGLHeatmapLayer.updateLayer") {
38
39
  try style.updateLayer(withId: self.id, type: LayerType.self) { (layer: inout HeatmapLayer) in updater(&layer) }
39
40
  }},
@@ -17,6 +17,8 @@ open class RCTMGLMapView : MapView {
17
17
  var styleLoaded: Bool = false
18
18
  var styleLoadWaiters : [(MapboxMap)->Void] = []
19
19
  var onStyleLoadedComponents: [RCTMGLMapComponent] = []
20
+
21
+ var componentsToRefreshOnStyleChange: [RCTMGLMapComponent] = []
20
22
 
21
23
  weak var reactCamera : RCTMGLCamera?
22
24
  var images : [RCTMGLImages] = []
@@ -35,7 +37,7 @@ open class RCTMGLMapView : MapView {
35
37
  }()
36
38
 
37
39
  lazy var calloutAnnotationManager : MapboxMaps.PointAnnotationManager = {
38
- return annotations.makePointAnnotationManager(id: "rctmlg-callout")
40
+ return annotations.makePointAnnotationManager(id: "rctmgl-mapview-callouts")
39
41
  }()
40
42
 
41
43
  var mapView : MapView {
@@ -46,6 +48,7 @@ open class RCTMGLMapView : MapView {
46
48
  if let mapComponent = subview as? RCTMGLMapComponent {
47
49
  let style = mapView.mapboxMap.style
48
50
  if mapComponent.waitForStyleLoad() {
51
+ componentsToRefreshOnStyleChange.append(mapComponent)
49
52
  if (self.styleLoaded) {
50
53
  mapComponent.addToMap(self, style: style)
51
54
  } else {
@@ -66,6 +69,7 @@ open class RCTMGLMapView : MapView {
66
69
  if let mapComponent = subview as? RCTMGLMapComponent {
67
70
  if mapComponent.waitForStyleLoad() {
68
71
  onStyleLoadedComponents.removeAll { $0 === mapComponent }
72
+ componentsToRefreshOnStyleChange.removeAll { $0 === mapComponent }
69
73
  }
70
74
  mapComponent.removeFromMap(self)
71
75
  } else {
@@ -273,7 +277,21 @@ open class RCTMGLMapView : MapView {
273
277
  self.mapView.gestures.options.pitchEnabled = value
274
278
  }
275
279
 
280
+ func refreshComponentsBeforeStyleChange() {
281
+ componentsToRefreshOnStyleChange.forEach {
282
+ $0.removeFromMap(self)
283
+ }
284
+ }
285
+
286
+ func refreshComponentsAfterStyleChange(style: Style) {
287
+ componentsToRefreshOnStyleChange.forEach {
288
+ $0.addToMap(self, style: style)
289
+ }
290
+ }
291
+
276
292
  @objc func setReactStyleURL(_ value: String?) {
293
+ var initialLoad = !self.styleLoaded
294
+ if !initialLoad { refreshComponentsBeforeStyleChange() }
277
295
  self.styleLoaded = false
278
296
  if let value = value {
279
297
  if let _ = URL(string: value) {
@@ -283,7 +301,14 @@ open class RCTMGLMapView : MapView {
283
301
  mapView.mapboxMap.loadStyleJSON(value)
284
302
  }
285
303
  }
304
+ if !initialLoad {
305
+ self.onNext(event: .styleLoaded) {_,_ in
306
+ self.refreshComponentsAfterStyleChange(style: self.mapboxMap.style)
307
+ }
308
+ }
286
309
  }
310
+ let event = RCTMGLEvent(type:.willStartLoadingMap, payload: nil);
311
+ self.fireEvent(event: event, callback: self.reactOnMapChange)
287
312
  }
288
313
 
289
314
  private func getOrnamentOptionsFromPosition(_ position: [String: NSNumber]) -> (position: OrnamentPosition, margins: CGPoint)? {
@@ -872,7 +897,7 @@ class PointAnnotationManager : AnnotationInteractionDelegate {
872
897
  weak var mapView : MapView? = nil
873
898
 
874
899
  init(annotations: AnnotationOrchestrator, mapView: MapView) {
875
- manager = annotations.makePointAnnotationManager()
900
+ manager = annotations.makePointAnnotationManager(id: "rctmgl-mapview-point-annotations")
876
901
  manager.delegate = self
877
902
  self.mapView = mapView
878
903
  }
@@ -20,14 +20,15 @@ class RCTMGLRasterLayer: RCTMGLLayer {
20
20
  }
21
21
 
22
22
  override func addStyles() {
23
- if let style : Style = self.style {
23
+ if let style : Style = self.style,
24
+ let reactStyle = reactStyle {
24
25
  let styler = RCTMGLStyle(style: self.style!)
25
26
  styler.bridge = self.bridge
26
27
 
27
28
  if var styleLayer = self.styleLayer as? LayerType {
28
29
  styler.rasterLayer(
29
30
  layer: &styleLayer,
30
- reactStyle: reactStyle!,
31
+ reactStyle: reactStyle,
31
32
  applyUpdater:{ (updater) in logged("RCTMGLRasterLayer.updateLayer") {
32
33
  try style.updateLayer(withId: self.id, type: LayerType.self) { (layer: inout LayerType) in updater(&layer) }
33
34
  }},
@@ -6,7 +6,7 @@ class RCTMGLSymbolLayer: RCTMGLVectorLayer {
6
6
  typealias LayerType = SymbolLayer
7
7
 
8
8
  override func makeLayer(style: Style) throws -> Layer {
9
- let vectorSource : VectorSource = try self.layerWithSourceID(in: style)
9
+ let _ : VectorSource = try self.layerWithSourceID(in: style)
10
10
  var layer = LayerType(id: self.id!)
11
11
  layer.sourceLayer = self.sourceLayerID
12
12
  layer.source = sourceID
@@ -64,14 +64,15 @@ class RCTMGLTerrain : RCTMGLSingletonLayer, RCTMGLMapComponent, RCTMGLSourceCons
64
64
  }
65
65
 
66
66
  override func addStyles() {
67
- if let style : Style = self.style {
67
+ if let style : Style = self.style,
68
+ let reactStyle = reactStyle {
68
69
  let styler = RCTMGLStyle(style: style)
69
70
  styler.bridge = self.bridge
70
71
 
71
72
  if var terrain = terrain {
72
73
  styler.terrainLayer(
73
74
  layer: &terrain,
74
- reactStyle: reactStyle ?? [:],
75
+ reactStyle: reactStyle,
75
76
  applyUpdater: { (updater) in fatalError("Terrain: TODO - implement apply updater")},
76
77
  isValid: { fatalError("Terrain: TODO - no isValid") }
77
78
  )
@@ -40,6 +40,7 @@ import Style from './components/Style';
40
40
  import Logger from './utils/Logger';
41
41
  import { deprecatedClass } from './utils/deprecation';
42
42
  import { requestAndroidLocationPermissions } from './requestAndroidLocationPermissions';
43
+ import { getAnnotationsLayerID } from './utils/getAnnotationsLayerID';
43
44
 
44
45
  const MapboxGL = { ...NativeModules.MGLModule };
45
46
 
@@ -107,6 +108,7 @@ MapboxGL.Animated.ExtractCoordinateFromArray =
107
108
 
108
109
  // utils
109
110
  MapboxGL.Logger = Logger;
111
+ MapboxGL.getAnnotationsLayerID = getAnnotationsLayerID;
110
112
 
111
113
  const { LineJoin } = MapboxGL;
112
114
 
@@ -150,6 +152,7 @@ export {
150
152
  Animated,
151
153
  LineJoin,
152
154
  Logger,
155
+ getAnnotationsLayerID,
153
156
  Style,
154
157
  };
155
158
 
@@ -0,0 +1,16 @@
1
+ import { Platform } from 'react-native';
2
+
3
+ /*
4
+ * Retrieve the layer ids used for PointAnnotations and Callouts
5
+ */
6
+ export const getAnnotationsLayerID = (
7
+ type: 'PointAnnotations' | 'Callouts',
8
+ ) => {
9
+ return Platform.select({
10
+ android: 'rctmgl-mapview-annotations',
11
+ ios: {
12
+ PointAnnotations: 'rctmgl-mapview-point-annotations',
13
+ Callouts: 'rctmgl-mapview-callouts',
14
+ }[type],
15
+ });
16
+ };
@@ -204,6 +204,12 @@ Object.defineProperty(exports, "VectorSource", {
204
204
  }
205
205
  });
206
206
  exports.default = void 0;
207
+ Object.defineProperty(exports, "getAnnotationsLayerID", {
208
+ enumerable: true,
209
+ get: function () {
210
+ return _getAnnotationsLayerID.getAnnotationsLayerID;
211
+ }
212
+ });
207
213
  Object.defineProperty(exports, "locationManager", {
208
214
  enumerable: true,
209
215
  get: function () {
@@ -257,6 +263,7 @@ var _Style = _interopRequireDefault(require("./components/Style"));
257
263
  var _Logger = _interopRequireDefault(require("./utils/Logger"));
258
264
  var _deprecation = require("./utils/deprecation");
259
265
  var _requestAndroidLocationPermissions = require("./requestAndroidLocationPermissions");
266
+ var _getAnnotationsLayerID = require("./utils/getAnnotationsLayerID");
260
267
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
261
268
  const MapboxGL = {
262
269
  ..._reactNative.NativeModules.MGLModule
@@ -320,6 +327,7 @@ MapboxGL.Animated.ExtractCoordinateFromArray = _classes.AnimatedExtractCoordinat
320
327
 
321
328
  // utils
322
329
  MapboxGL.Logger = _Logger.default;
330
+ MapboxGL.getAnnotationsLayerID = _getAnnotationsLayerID.getAnnotationsLayerID;
323
331
  const {
324
332
  LineJoin
325
333
  } = MapboxGL;
@@ -1 +1 @@
1
- {"version":3,"names":["MapboxGL","NativeModules","MGLModule","requestAndroidLocationPermissions","UserTrackingModes","UserTrackingMode","MapView","Light","PointAnnotation","Callout","UserLocation","Camera","Style","AnimatedPoint","AnimatedMapPoint","deprecatedClass","AnimatedShape","AnimatedCoordinatesArray","AnimatedExtractCoordinateFromArray","AnimatedRouteCoordinatesArray","Annotation","MarkerView","VectorSource","ShapeSource","RasterSource","ImageSource","Images","RasterDemSource","FillLayer","FillExtrusionLayer","HeatmapLayer","LineLayer","CircleLayer","SkyLayer","SymbolLayer","RasterLayer","BackgroundLayer","Terrain","Atmosphere","locationManager","offlineManager","snapshotManager","Animated","RouteCoordinatesArray","ExtractCoordinateFromArray","Logger","LineJoin"],"sourceRoot":"../../javascript","sources":["index.js"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AACA;A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,eAAM;AACxB1B,QAAQ,CAAC2B,eAAe,GAAGA,wBAAe;;AAE1C;AACA3B,QAAQ,CAAC4B,SAAS,GAAGA,kBAAS;AAC9B5B,QAAQ,CAAC6B,kBAAkB,GAAGA,2BAAkB;AAChD7B,QAAQ,CAAC8B,YAAY,GAAGA,qBAAY;AACpC9B,QAAQ,CAAC+B,SAAS,GAAGA,kBAAS;AAC9B/B,QAAQ,CAACgC,WAAW,GAAGA,oBAAW;AAClChC,QAAQ,CAACiC,QAAQ,GAAGA,iBAAQ;AAC5BjC,QAAQ,CAACkC,WAAW,GAAGA,wBAAW;AAClClC,QAAQ,CAACmC,WAAW,GAAGA,oBAAW;AAClCnC,QAAQ,CAACoC,eAAe,GAAGA,wBAAe;AAE1CpC,QAAQ,CAACqC,OAAO,GAAGA,gBAAO;AAC1BrC,QAAQ,CAACsC,UAAU,GAAGA,sBAAU;;AAEhC;AACAtC,QAAQ,CAACuC,eAAe,GAAGA,wBAAe;AAC1CvC,QAAQ,CAACwC,cAAc,GAAGA,uBAAc;AACxCxC,QAAQ,CAACyC,eAAe,GAAGA,wBAAe;;AAE1C;AACAzC,QAAQ,CAAC0C,QAAQ,GAAGA,iBAAQ;AAC5B1C,QAAQ,CAAC0C,QAAQ,CAACC,qBAAqB,GAAGxB,sCAA6B,CAAC,CAAC;AACzEnB,QAAQ,CAAC0C,QAAQ,CAACE,0BAA0B,GAC1C1B,2CAAkC,CAAC,CAAC;;AAEtC;AACAlB,QAAQ,CAAC6C,MAAM,GAAGA,eAAM;AAExB,MAAM;EAAEC;AAAS,CAAC,GAAG9C,QAAQ;AAAC;AAE9B,MAAMc,gBAAgB,GAAGD,sBAAa,CAAC,CAAC;AAAA;AAAA,eA2CzBb,QAAQ;AAAA"}
1
+ {"version":3,"names":["MapboxGL","NativeModules","MGLModule","requestAndroidLocationPermissions","UserTrackingModes","UserTrackingMode","MapView","Light","PointAnnotation","Callout","UserLocation","Camera","Style","AnimatedPoint","AnimatedMapPoint","deprecatedClass","AnimatedShape","AnimatedCoordinatesArray","AnimatedExtractCoordinateFromArray","AnimatedRouteCoordinatesArray","Annotation","MarkerView","VectorSource","ShapeSource","RasterSource","ImageSource","Images","RasterDemSource","FillLayer","FillExtrusionLayer","HeatmapLayer","LineLayer","CircleLayer","SkyLayer","SymbolLayer","RasterLayer","BackgroundLayer","Terrain","Atmosphere","locationManager","offlineManager","snapshotManager","Animated","RouteCoordinatesArray","ExtractCoordinateFromArray","Logger","getAnnotationsLayerID","LineJoin"],"sourceRoot":"../../javascript","sources":["index.js"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAAsE;AAEtE,MAAMA,QAAQ,GAAG;EAAE,GAAGC,0BAAa,CAACC;AAAU,CAAC;;AAE/C;AACAF,QAAQ,CAACG,iCAAiC,GAAGA,oEAAiC;AAC9EH,QAAQ,CAACI,iBAAiB,GAAGC,wBAAgB;;AAE7C;AACAL,QAAQ,CAACM,OAAO,GAAGA,gBAAO;AAC1BN,QAAQ,CAACO,KAAK,GAAGA,cAAK;AACtBP,QAAQ,CAACQ,eAAe,GAAGA,wBAAe;AAC1CR,QAAQ,CAACS,OAAO,GAAGA,gBAAO;AAC1BT,QAAQ,CAACU,YAAY,GAAGA,qBAAY;AACpCV,QAAQ,CAACW,MAAM,GAAGA,cAAM;AACxBX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ACuC,eAAe,GAAGA,wBAAe;AAC1CvC,QAAQ,CAACwC,cAAc,GAAGA,uBAAc;AACxCxC,QAAQ,CAACyC,eAAe,GAAGA,wBAAe;;AAE1C;AACAzC,QAAQ,CAAC0C,QAAQ,GAAGA,iBAAQ;AAC5B1C,QAAQ,CAAC0C,QAAQ,CAACC,qBAAqB,GAAGxB,sCAA6B,CAAC,CAAC;AACzEnB,QAAQ,CAAC0C,QAAQ,CAACE,0BAA0B,GAC1C1B,2CAAkC,CAAC,CAAC;;AAEtC;AACAlB,QAAQ,CAAC6C,MAAM,GAAGA,eAAM;AACxB7C,QAAQ,CAAC8C,qBAAqB,GAAGA,4CAAqB;AAEtD,MAAM;EAAEC;AAAS,CAAC,GAAG/C,QAAQ;AAAC;AAE9B,MAAMc,gBAAgB,GAAGD,sBAAa,CAAC,CAAC;AAAA;AAAA,eA4CzBb,QAAQ;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["getFilter","filter","Array","isArray","length"],"sourceRoot":"../../javascript","sources":["filterUtils.tsx"],"mappings":";;;;;;AAAO,SAASA,SAAS,CAACC,MAA0B,EAAY;EAC9D,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,IAAIA,MAAM,CAACG,MAAM,KAAK,CAAC,EAAE;IACjD,OAAO,EAAE;EACX;EAEA,OAAOH,MAAM;AACf"}
1
+ {"version":3,"names":["getFilter","filter","Array","isArray","length"],"sourceRoot":"../../javascript","sources":["filterUtils.ts"],"mappings":";;;;;;AAAO,SAASA,SAAS,CAACC,MAA0B,EAAY;EAC9D,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,IAAIA,MAAM,CAACG,MAAM,KAAK,CAAC,EAAE;IACjD,OAAO,EAAE;EACX;EAEA,OAAOH,MAAM;AACf"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAnnotationsLayerID = void 0;
7
+ var _reactNative = require("react-native");
8
+ /*
9
+ * Retrieve the layer ids used for PointAnnotations and Callouts
10
+ */
11
+ const getAnnotationsLayerID = type => {
12
+ return _reactNative.Platform.select({
13
+ android: 'rctmgl-mapview-annotations',
14
+ ios: {
15
+ PointAnnotations: 'rctmgl-mapview-point-annotations',
16
+ Callouts: 'rctmgl-mapview-callouts'
17
+ }[type]
18
+ });
19
+ };
20
+ exports.getAnnotationsLayerID = getAnnotationsLayerID;
21
+ //# sourceMappingURL=getAnnotationsLayerID.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getAnnotationsLayerID","type","Platform","select","android","ios","PointAnnotations","Callouts"],"sourceRoot":"../../javascript","sources":["getAnnotationsLayerID.ts"],"mappings":";;;;;;AAAA;AAEA;AACA;AACA;AACO,MAAMA,qBAAqB,GAChCC,IAAqC,IAClC;EACH,OAAOC,qBAAQ,CAACC,MAAM,CAAC;IACrBC,OAAO,EAAE,4BAA4B;IACrCC,GAAG,EAAE;MACHC,gBAAgB,EAAE,kCAAkC;MACpDC,QAAQ,EAAE;IACZ,CAAC,CAACN,IAAI;EACR,CAAC,CAAC;AACJ,CAAC;AAAC"}
@@ -33,6 +33,7 @@ import Style from './components/Style';
33
33
  import Logger from './utils/Logger';
34
34
  import { deprecatedClass } from './utils/deprecation';
35
35
  import { requestAndroidLocationPermissions } from './requestAndroidLocationPermissions';
36
+ import { getAnnotationsLayerID } from './utils/getAnnotationsLayerID';
36
37
  const MapboxGL = {
37
38
  ...NativeModules.MGLModule
38
39
  };
@@ -95,11 +96,12 @@ MapboxGL.Animated.ExtractCoordinateFromArray = AnimatedExtractCoordinateFromArra
95
96
 
96
97
  // utils
97
98
  MapboxGL.Logger = Logger;
99
+ MapboxGL.getAnnotationsLayerID = getAnnotationsLayerID;
98
100
  const {
99
101
  LineJoin
100
102
  } = MapboxGL;
101
103
  const AnimatedMapPoint = AnimatedPoint; // For backwards compatibiilty.
102
104
 
103
- export { MapView, Light, PointAnnotation, Callout, UserLocation, Camera, Annotation, MarkerView, VectorSource, ShapeSource, RasterSource, RasterDemSource, ImageSource, Images, FillLayer, FillExtrusionLayer, HeatmapLayer, LineLayer, CircleLayer, SkyLayer, SymbolLayer, RasterLayer, BackgroundLayer, Terrain, Atmosphere, AnimatedCoordinatesArray, AnimatedExtractCoordinateFromArray, AnimatedPoint, AnimatedMapPoint, AnimatedRouteCoordinatesArray, AnimatedShape, locationManager, offlineManager, snapshotManager, Animated, LineJoin, Logger, Style };
105
+ export { MapView, Light, PointAnnotation, Callout, UserLocation, Camera, Annotation, MarkerView, VectorSource, ShapeSource, RasterSource, RasterDemSource, ImageSource, Images, FillLayer, FillExtrusionLayer, HeatmapLayer, LineLayer, CircleLayer, SkyLayer, SymbolLayer, RasterLayer, BackgroundLayer, Terrain, Atmosphere, AnimatedCoordinatesArray, AnimatedExtractCoordinateFromArray, AnimatedPoint, AnimatedMapPoint, AnimatedRouteCoordinatesArray, AnimatedShape, locationManager, offlineManager, snapshotManager, Animated, LineJoin, Logger, getAnnotationsLayerID, Style };
104
106
  export default MapboxGL;
105
107
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModules","Camera","UserTrackingMode","Atmosphere","MapView","Light","PointAnnotation","Annotation","Callout","UserLocation","VectorSource","ShapeSource","RasterSource","RasterDemSource","ImageSource","Images","FillLayer","FillExtrusionLayer","HeatmapLayer","LineLayer","CircleLayer","SkyLayer","SymbolLayer","RasterLayer","BackgroundLayer","Terrain","locationManager","offlineManager","snapshotManager","MarkerView","Animated","AnimatedCoordinatesArray","AnimatedExtractCoordinateFromArray","AnimatedPoint","AnimatedRouteCoordinatesArray","AnimatedShape","Style","Logger","deprecatedClass","requestAndroidLocationPermissions","MapboxGL","MGLModule","UserTrackingModes","AnimatedMapPoint","RouteCoordinatesArray","ExtractCoordinateFromArray","LineJoin"],"sourceRoot":"../../javascript","sources":["index.js"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAE5C,SAASC,MAAM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EACbT,eAAe,EACfC,cAAc,EACdC,eAAe,EACfE,QAAQ,EACRgB,QAAQ,EACRT,MAAM,EACND,KAAK;AAGP,eAAeI,QAAQ"}
1
+ {"version":3,"names":["NativeModules","Camera","UserTrackingMode","Atmosphere","MapView","Light","PointAnnotation","Annotation","Callout","UserLocation","VectorSource","ShapeSource","RasterSource","RasterDemSource","ImageSource","Images","FillLayer","FillExtrusionLayer","HeatmapLayer","LineLayer","CircleLayer","SkyLayer","SymbolLayer","RasterLayer","BackgroundLayer","Terrain","locationManager","offlineManager","snapshotManager","MarkerView","Animated","AnimatedCoordinatesArray","AnimatedExtractCoordinateFromArray","AnimatedPoint","AnimatedRouteCoordinatesArray","AnimatedShape","Style","Logger","deprecatedClass","requestAndroidLocationPermissions","getAnnotationsLayerID","MapboxGL","MGLModule","UserTrackingModes","AnimatedMapPoint","RouteCoordinatesArray","ExtractCoordinateFromArray","LineJoin"],"sourceRoot":"../../javascript","sources":["index.js"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAE5C,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,qBAAqB;AAC9D,SAASC,UAAU,QAAQ,yBAAyB;AACpD,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,OAAOC,KAAK,MAAM,oBAAoB;AACtC,OAAOC,eAAe,MAAM,8BAA8B;AAC1D,OAAOC,UAAU,MAAM,qCAAqC;AAC5D,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,OAAOC,YAAY,MAAM,2BAA2B;AACpD,OAAOC,YAAY,MAAM,2BAA2B;AACpD,SAASC,WAAW,QAAQ,0BAA0B;AACtD,OAAOC,YAAY,MAAM,2BAA2B;AACpD,OAAOC,eAAe,MAAM,8BAA8B;AAC1D,OAAOC,WAAW,MAAM,0BAA0B;AAClD,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,SAAS,MAAM,wBAAwB;AAC9C,OAAOC,kBAAkB,MAAM,iCAAiC;AAChE,OAAOC,YAAY,MAAM,2BA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Q;AAC5BW,QAAQ,CAACX,QAAQ,CAACe,qBAAqB,GAAGX,6BAA6B,CAAC,CAAC;AACzEO,QAAQ,CAACX,QAAQ,CAACgB,0BAA0B,GAC1Cd,kCAAkC,CAAC,CAAC;;AAEtC;AACAS,QAAQ,CAACJ,MAAM,GAAGA,MAAM;AACxBI,QAAQ,CAACD,qBAAqB,GAAGA,qBAAqB;AAEtD,MAAM;EAAEO;AAAS,CAAC,GAAGN,QAAQ;AAE7B,MAAMG,gBAAgB,GAAGX,aAAa,CAAC,CAAC;;AAExC,SACE7B,OAAO,EACPC,KAAK,EACLC,eAAe,EACfE,OAAO,EACPC,YAAY,EACZR,MAAM,EACNM,UAAU,EACVsB,UAAU,EACVnB,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,eAAe,EACfC,WAAW,EACXC,MAAM,EACNC,SAAS,EACTC,kBAAkB,EAClBC,YAAY,EACZC,SAAS,EACTC,WAAW,EACXC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,OAAO,EACPtB,UAAU,EACV4B,wBAAwB,EACxBC,kCAAkC,EAClCC,aAAa,EACbW,gBAAgB,EAChBV,6BAA6B,EAC7BC,aAAa,EACbT,eAAe,EACfC,cAAc,EACdC,eAAe,EACfE,QAAQ,EACRiB,QAAQ,EACRV,MAAM,EACNG,qBAAqB,EACrBJ,KAAK;AAGP,eAAeK,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"names":["getFilter","filter","Array","isArray","length"],"sourceRoot":"../../javascript","sources":["filterUtils.tsx"],"mappings":"AAAA,OAAO,SAASA,SAAS,CAACC,MAA0B,EAAY;EAC9D,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,IAAIA,MAAM,CAACG,MAAM,KAAK,CAAC,EAAE;IACjD,OAAO,EAAE;EACX;EAEA,OAAOH,MAAM;AACf"}
1
+ {"version":3,"names":["getFilter","filter","Array","isArray","length"],"sourceRoot":"../../javascript","sources":["filterUtils.ts"],"mappings":"AAAA,OAAO,SAASA,SAAS,CAACC,MAA0B,EAAY;EAC9D,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,IAAIA,MAAM,CAACG,MAAM,KAAK,CAAC,EAAE;IACjD,OAAO,EAAE;EACX;EAEA,OAAOH,MAAM;AACf"}
@@ -0,0 +1,15 @@
1
+ import { Platform } from 'react-native';
2
+
3
+ /*
4
+ * Retrieve the layer ids used for PointAnnotations and Callouts
5
+ */
6
+ export const getAnnotationsLayerID = type => {
7
+ return Platform.select({
8
+ android: 'rctmgl-mapview-annotations',
9
+ ios: {
10
+ PointAnnotations: 'rctmgl-mapview-point-annotations',
11
+ Callouts: 'rctmgl-mapview-callouts'
12
+ }[type]
13
+ });
14
+ };
15
+ //# sourceMappingURL=getAnnotationsLayerID.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","getAnnotationsLayerID","type","select","android","ios","PointAnnotations","Callouts"],"sourceRoot":"../../javascript","sources":["getAnnotationsLayerID.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAChCC,IAAqC,IAClC;EACH,OAAOF,QAAQ,CAACG,MAAM,CAAC;IACrBC,OAAO,EAAE,4BAA4B;IACrCC,GAAG,EAAE;MACHC,gBAAgB,EAAE,kCAAkC;MACpDC,QAAQ,EAAE;IACZ,CAAC,CAACL,IAAI;EACR,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../javascript/utils/filterUtils.tsx"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,MAAM,EAAE,CAM9D"}
1
+ {"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../javascript/utils/filterUtils.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,MAAM,EAAE,CAM9D"}
@@ -0,0 +1,2 @@
1
+ export declare const getAnnotationsLayerID: (type: 'PointAnnotations' | 'Callouts') => string | undefined;
2
+ //# sourceMappingURL=getAnnotationsLayerID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAnnotationsLayerID.d.ts","sourceRoot":"","sources":["../../../javascript/utils/getAnnotationsLayerID.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,SAC1B,kBAAkB,GAAG,UAAU,uBAStC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
3
  "description": "A Mapbox react native module for creating custom maps",
4
- "version": "10.0.0-beta.60",
4
+ "version": "10.0.0-beta.61",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -120,7 +120,7 @@
120
120
  "*.{js,jsx,ts,tsx}": "eslint --fix"
121
121
  },
122
122
  "module": "lib/module/index.js",
123
- "types": "lib/typescript/javascript/index.d.ts",
123
+ "types": "index.d.ts",
124
124
  "files": [
125
125
  "javascript",
126
126
  "lib",
@@ -13,7 +13,7 @@ export declare function addMapboxInstallerBlock(src: string, blockName: Installe
13
13
  * Without this, production builds targeting simulators will fail.
14
14
  */
15
15
  export declare function setExcludedArchitectures(project: XcodeProject): XcodeProject;
16
- declare const addMapboxMavenRepo: (projectBuildGradle: string) => string;
16
+ export declare function addMapboxMavenRepo(src: string): string;
17
17
  declare const _default: ConfigPlugin<MapboxPlugProps>;
18
18
  export default _default;
19
19
  export { addMapboxMavenRepo as _addMapboxMavenRepo, };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports._addMapboxMavenRepo = exports.setExcludedArchitectures = exports.addMapboxInstallerBlock = exports.addInstallerBlock = exports.addConstantBlock = exports.applyCocoaPodsModifications = void 0;
6
+ exports._addMapboxMavenRepo = exports.addMapboxMavenRepo = exports.setExcludedArchitectures = exports.addMapboxInstallerBlock = exports.addInstallerBlock = exports.addConstantBlock = exports.applyCocoaPodsModifications = void 0;
7
7
  const fs_1 = require("fs");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const config_plugins_1 = require("expo/config-plugins");
@@ -208,67 +208,54 @@ const addLibCppFilter = (appBuildGradle) => {
208
208
  comment: '//',
209
209
  }).contents;
210
210
  };
211
- const addMapboxMavenRepo = (projectBuildGradle) => {
212
- if (projectBuildGradle.includes('api.mapbox.com/downloads/v2/releases/maven'))
213
- return projectBuildGradle;
214
- /*
215
- Should look like this:
216
-
217
- allprojects {
218
- configurations.all {
219
- resolutionStrategy {
220
- force \\"com.facebook.react:react-native:\\" + REACT_NATIVE_VERSION
221
- }
211
+ // Because we need the package to be added AFTER the React and Google maven packages, we create a new allprojects.
212
+ // It's ok to have multiple allprojects.repositories, so we create a new one since it's cheaper than tokenizing
213
+ // the existing block to find the correct place to insert our mapbox maven.
214
+ const gradleMaven = `
215
+ allprojects {
216
+ repositories {
217
+ maven {
218
+ url 'https://api.mapbox.com/downloads/v2/releases/maven'
219
+ authentication { basic(BasicAuthentication) }
220
+ credentials {
221
+ username = 'mapbox'
222
+ password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
222
223
  }
223
-
224
- repositories {
225
- maven {
226
- url 'https://api.mapbox.com/downloads/v2/releases/maven'
227
- authentication { basic(BasicAuthentication) }
228
- credentials {
229
- username = 'mapbox'
230
- password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
231
- }
232
- }
233
- mavenLocal()
234
- maven {
235
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
236
- url(new File(['node', '--print', \\"require.resolve('react-native/package.json')\\"].execute(null, rootDir).text.trim(), '../android'))
237
- }
238
- // ...
239
- */
240
- /*
241
- Since mergeContents checks the anchor for each line, we can't do a "correct"
242
- RegExp for allprojects...repositories.
243
- Instead, we check for the first `allprojects`, and then count the # of lines to the next `repositories` block.
244
- */
245
- let offset = 0;
246
- const anchor = new RegExp(`^\\s*allprojects\\s*{`, 'gm');
247
- // hack to count offset
248
- const allProjectSplit = projectBuildGradle.split(anchor);
249
- if (allProjectSplit.length <= 1)
250
- throw new Error('Could not find `allprojects` block');
251
- const allProjectLines = allProjectSplit[allProjectSplit.length - 1].split('\n');
252
- const allProjectReposOffset = allProjectLines.findIndex((line) => line.includes('repositories'));
253
- anchor.lastIndex = 0;
254
- offset = allProjectReposOffset + 1;
255
- return (0, generateCode_1.mergeContents)({
256
- tag: `@rnmapbox/maps-v2-maven`,
257
- src: projectBuildGradle,
258
- newSrc: `
259
- maven {
260
- url 'https://api.mapbox.com/downloads/v2/releases/maven'
261
- authentication { basic(BasicAuthentication) }
262
- credentials {
263
- username = 'mapbox'
264
- password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
265
- }
266
- }\n`,
267
- anchor,
268
- offset,
224
+ }
225
+ }
226
+ }
227
+ `;
228
+ // Fork of config-plugins mergeContents, but appends the contents to the end of the file.
229
+ function appendContents({ src, newSrc, tag, comment, }) {
230
+ const header = (0, generateCode_1.createGeneratedHeaderComment)(newSrc, tag, comment);
231
+ if (!src.includes(header)) {
232
+ // Ensure the old generated contents are removed.
233
+ const sanitizedTarget = (0, generateCode_1.removeGeneratedContents)(src, tag);
234
+ const contentsToAdd = [
235
+ // @something
236
+ header,
237
+ // contents
238
+ newSrc,
239
+ // @end
240
+ `${comment} @generated end ${tag}`,
241
+ ].join('\n');
242
+ return {
243
+ contents: sanitizedTarget ?? src + contentsToAdd,
244
+ didMerge: true,
245
+ didClear: !!sanitizedTarget,
246
+ };
247
+ }
248
+ return { contents: src, didClear: false, didMerge: false };
249
+ }
250
+ function addMapboxMavenRepo(src) {
251
+ return appendContents({
252
+ tag: '@rnmapbox/maps-v2-maven',
253
+ src,
254
+ newSrc: gradleMaven,
269
255
  comment: '//',
270
256
  }).contents;
271
- };
257
+ }
258
+ exports.addMapboxMavenRepo = addMapboxMavenRepo;
272
259
  exports._addMapboxMavenRepo = addMapboxMavenRepo;
273
260
  const withAndroidAppGradle = (config) => {
274
261
  return (0, config_plugins_1.withAppBuildGradle)(config, ({ modResults, ...config }) => {
@@ -13,7 +13,12 @@ import {
13
13
  withAppBuildGradle,
14
14
  } from 'expo/config-plugins';
15
15
 
16
- import { mergeContents, removeGeneratedContents } from './generateCode';
16
+ import {
17
+ mergeContents,
18
+ createGeneratedHeaderComment,
19
+ removeGeneratedContents,
20
+ MergeResults,
21
+ } from './generateCode';
17
22
 
18
23
  let pkg: { name: string; version?: string } = {
19
24
  name: '@rnmapbox/maps',
@@ -266,74 +271,66 @@ const addLibCppFilter = (appBuildGradle: string): string => {
266
271
  }).contents;
267
272
  };
268
273
 
269
- const addMapboxMavenRepo = (projectBuildGradle: string): string => {
270
- if (projectBuildGradle.includes('api.mapbox.com/downloads/v2/releases/maven'))
271
- return projectBuildGradle;
272
-
273
- /*
274
- Should look like this:
275
-
276
- allprojects {
277
- configurations.all {
278
- resolutionStrategy {
279
- force \\"com.facebook.react:react-native:\\" + REACT_NATIVE_VERSION
280
- }
274
+ // Because we need the package to be added AFTER the React and Google maven packages, we create a new allprojects.
275
+ // It's ok to have multiple allprojects.repositories, so we create a new one since it's cheaper than tokenizing
276
+ // the existing block to find the correct place to insert our mapbox maven.
277
+ const gradleMaven = `
278
+ allprojects {
279
+ repositories {
280
+ maven {
281
+ url 'https://api.mapbox.com/downloads/v2/releases/maven'
282
+ authentication { basic(BasicAuthentication) }
283
+ credentials {
284
+ username = 'mapbox'
285
+ password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
286
+ }
281
287
  }
288
+ }
289
+ }
290
+ `;
291
+
292
+ // Fork of config-plugins mergeContents, but appends the contents to the end of the file.
293
+ function appendContents({
294
+ src,
295
+ newSrc,
296
+ tag,
297
+ comment,
298
+ }: {
299
+ src: string;
300
+ newSrc: string;
301
+ tag: string;
302
+ comment: string;
303
+ }): MergeResults {
304
+ const header = createGeneratedHeaderComment(newSrc, tag, comment);
305
+ if (!src.includes(header)) {
306
+ // Ensure the old generated contents are removed.
307
+ const sanitizedTarget = removeGeneratedContents(src, tag);
308
+ const contentsToAdd = [
309
+ // @something
310
+ header,
311
+ // contents
312
+ newSrc,
313
+ // @end
314
+ `${comment} @generated end ${tag}`,
315
+ ].join('\n');
316
+
317
+ return {
318
+ contents: sanitizedTarget ?? src + contentsToAdd,
319
+ didMerge: true,
320
+ didClear: !!sanitizedTarget,
321
+ };
322
+ }
323
+ return { contents: src, didClear: false, didMerge: false };
324
+ }
282
325
 
283
- repositories {
284
- maven {
285
- url 'https://api.mapbox.com/downloads/v2/releases/maven'
286
- authentication { basic(BasicAuthentication) }
287
- credentials {
288
- username = 'mapbox'
289
- password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
290
- }
291
- }
292
- mavenLocal()
293
- maven {
294
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
295
- url(new File(['node', '--print', \\"require.resolve('react-native/package.json')\\"].execute(null, rootDir).text.trim(), '../android'))
296
- }
297
- // ...
298
- */
299
-
300
- /*
301
- Since mergeContents checks the anchor for each line, we can't do a "correct"
302
- RegExp for allprojects...repositories.
303
- Instead, we check for the first `allprojects`, and then count the # of lines to the next `repositories` block.
304
- */
305
- let offset = 0;
306
- const anchor = new RegExp(`^\\s*allprojects\\s*{`, 'gm');
307
- // hack to count offset
308
- const allProjectSplit = projectBuildGradle.split(anchor);
309
- if (allProjectSplit.length <= 1)
310
- throw new Error('Could not find `allprojects` block');
311
-
312
- const allProjectLines =
313
- allProjectSplit[allProjectSplit.length - 1].split('\n');
314
- const allProjectReposOffset = allProjectLines.findIndex((line) =>
315
- line.includes('repositories'),
316
- );
317
- anchor.lastIndex = 0;
318
- offset = allProjectReposOffset + 1;
319
-
320
- return mergeContents({
321
- tag: `@rnmapbox/maps-v2-maven`,
322
- src: projectBuildGradle,
323
- newSrc: `
324
- maven {
325
- url 'https://api.mapbox.com/downloads/v2/releases/maven'
326
- authentication { basic(BasicAuthentication) }
327
- credentials {
328
- username = 'mapbox'
329
- password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
330
- }
331
- }\n`,
332
- anchor,
333
- offset,
326
+ export function addMapboxMavenRepo(src: string): string {
327
+ return appendContents({
328
+ tag: '@rnmapbox/maps-v2-maven',
329
+ src,
330
+ newSrc: gradleMaven,
334
331
  comment: '//',
335
332
  }).contents;
336
- };
333
+ }
337
334
 
338
335
  const withAndroidAppGradle: ConfigPlugin<MapboxPlugProps> = (config) => {
339
336
  return withAppBuildGradle(config, ({ modResults, ...config }) => {
@@ -20,7 +20,7 @@ require 'json'
20
20
  package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
21
21
 
22
22
  ## Warning: these lines are scanned by autogenerate.js
23
- rnMapboxMapsDefaultMapboxVersion = '~> 10.9.1'
23
+ rnMapboxMapsDefaultMapboxVersion = '~> 10.10.0'
24
24
  rnMapboxMapsDefaultMapboxGLVersion = '~> 5.9.0'
25
25
  rnMapboxMapsDefaultMapLibreVersion = 'exactVersion 5.12.1'
26
26