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

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 (29) hide show
  1. package/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +0 -55
  2. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +0 -55
  3. package/ios/RCTMGL/RCTMGLStyle.h +0 -5
  4. package/ios/RCTMGL/RCTMGLStyle.m +0 -35
  5. package/ios/RCTMGL-v10/RCTMGLLocationModule.swift +4 -2
  6. package/ios/RCTMGL-v10/RCTMGLStyle.swift +0 -35
  7. package/ios/RCTMGL.xcodeproj/project.pbxproj +1 -0
  8. package/javascript/components/UserLocation.js +2 -2
  9. package/javascript/modules/location/locationManager.js +13 -1
  10. package/javascript/utils/MapboxStyles.d.ts +27 -31
  11. package/javascript/utils/styleMap.ts +0 -45
  12. package/lib/commonjs/components/UserLocation.js +1 -1
  13. package/lib/commonjs/components/UserLocation.js.map +1 -1
  14. package/lib/commonjs/modules/location/locationManager.js +8 -1
  15. package/lib/commonjs/modules/location/locationManager.js.map +1 -1
  16. package/lib/commonjs/utils/styleMap.js +1 -41
  17. package/lib/commonjs/utils/styleMap.js.map +1 -1
  18. package/lib/commonjs/web/UnimplementedComponent.js.map +1 -1
  19. package/lib/module/components/UserLocation.js +1 -1
  20. package/lib/module/components/UserLocation.js.map +1 -1
  21. package/lib/module/modules/location/locationManager.js +8 -1
  22. package/lib/module/modules/location/locationManager.js.map +1 -1
  23. package/lib/module/utils/styleMap.js +1 -41
  24. package/lib/module/utils/styleMap.js.map +1 -1
  25. package/lib/module/web/UnimplementedComponent.js.map +1 -1
  26. package/lib/typescript/utils/styleMap.d.ts +0 -40
  27. package/lib/typescript/utils/styleMap.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/react-native.config.js +0 -3
@@ -80,9 +80,6 @@ public class RCTMGLStyleFactory {
80
80
  }
81
81
  });
82
82
  break;
83
- case "fillPatternTransition":
84
- RCTMGLStyleFactory.setFillPatternTransition(layer, styleValue);
85
- break;
86
83
  }
87
84
  }
88
85
  }
@@ -163,9 +160,6 @@ public class RCTMGLStyleFactory {
163
160
  case "lineDasharray":
164
161
  RCTMGLStyleFactory.setLineDasharray(layer, styleValue);
165
162
  break;
166
- case "lineDasharrayTransition":
167
- RCTMGLStyleFactory.setLineDasharrayTransition(layer, styleValue);
168
- break;
169
163
  case "linePattern":
170
164
  style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() {
171
165
  @Override
@@ -174,9 +168,6 @@ public class RCTMGLStyleFactory {
174
168
  }
175
169
  });
176
170
  break;
177
- case "linePatternTransition":
178
- RCTMGLStyleFactory.setLinePatternTransition(layer, styleValue);
179
- break;
180
171
  case "lineGradient":
181
172
  RCTMGLStyleFactory.setLineGradient(layer, styleValue);
182
173
  break;
@@ -564,9 +555,6 @@ public class RCTMGLStyleFactory {
564
555
  }
565
556
  });
566
557
  break;
567
- case "fillExtrusionPatternTransition":
568
- RCTMGLStyleFactory.setFillExtrusionPatternTransition(layer, styleValue);
569
- break;
570
558
  case "fillExtrusionHeight":
571
559
  RCTMGLStyleFactory.setFillExtrusionHeight(layer, styleValue);
572
560
  break;
@@ -719,9 +707,6 @@ public class RCTMGLStyleFactory {
719
707
  }
720
708
  });
721
709
  break;
722
- case "backgroundPatternTransition":
723
- RCTMGLStyleFactory.setBackgroundPatternTransition(layer, styleValue);
724
- break;
725
710
  case "backgroundOpacity":
726
711
  RCTMGLStyleFactory.setBackgroundOpacity(layer, styleValue);
727
712
  break;
@@ -871,14 +856,6 @@ public class RCTMGLStyleFactory {
871
856
  }
872
857
  }
873
858
 
874
-
875
- public static void setFillPatternTransition(FillLayer layer, RCTMGLStyleValue styleValue) {
876
- TransitionOptions transition = styleValue.getTransition();
877
- if (transition != null) {
878
- layer.setFillPatternTransition(transition);
879
- }
880
- }
881
-
882
859
  public static void setLineCap(LineLayer layer, RCTMGLStyleValue styleValue) {
883
860
  if (styleValue.isExpression()) {
884
861
  layer.setProperties(PropertyFactory.lineCap(styleValue.getExpression()));
@@ -1051,14 +1028,6 @@ public class RCTMGLStyleFactory {
1051
1028
  }
1052
1029
  }
1053
1030
 
1054
-
1055
- public static void setLineDasharrayTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
1056
- TransitionOptions transition = styleValue.getTransition();
1057
- if (transition != null) {
1058
- layer.setLineDasharrayTransition(transition);
1059
- }
1060
- }
1061
-
1062
1031
  public static void setLinePattern(LineLayer layer, RCTMGLStyleValue styleValue) {
1063
1032
  if (styleValue.isExpression()) {
1064
1033
  if (styleValue.isImageStringValue()) {
@@ -1071,14 +1040,6 @@ public class RCTMGLStyleFactory {
1071
1040
  }
1072
1041
  }
1073
1042
 
1074
-
1075
- public static void setLinePatternTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
1076
- TransitionOptions transition = styleValue.getTransition();
1077
- if (transition != null) {
1078
- layer.setLinePatternTransition(transition);
1079
- }
1080
- }
1081
-
1082
1043
  public static void setLineGradient(LineLayer layer, RCTMGLStyleValue styleValue) {
1083
1044
  if (styleValue.isExpression()) {
1084
1045
  layer.setProperties(PropertyFactory.lineGradient(styleValue.getExpression()));
@@ -1927,14 +1888,6 @@ public class RCTMGLStyleFactory {
1927
1888
  }
1928
1889
  }
1929
1890
 
1930
-
1931
- public static void setFillExtrusionPatternTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
1932
- TransitionOptions transition = styleValue.getTransition();
1933
- if (transition != null) {
1934
- layer.setFillExtrusionPatternTransition(transition);
1935
- }
1936
- }
1937
-
1938
1891
  public static void setFillExtrusionHeight(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
1939
1892
  if (styleValue.isExpression()) {
1940
1893
  layer.setProperties(PropertyFactory.fillExtrusionHeight(styleValue.getExpression()));
@@ -2207,14 +2160,6 @@ public class RCTMGLStyleFactory {
2207
2160
  }
2208
2161
  }
2209
2162
 
2210
-
2211
- public static void setBackgroundPatternTransition(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
2212
- TransitionOptions transition = styleValue.getTransition();
2213
- if (transition != null) {
2214
- layer.setBackgroundPatternTransition(transition);
2215
- }
2216
- }
2217
-
2218
2163
  public static void setBackgroundOpacity(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
2219
2164
  if (styleValue.isExpression()) {
2220
2165
  layer.setProperties(PropertyFactory.backgroundOpacity(styleValue.getExpression()));
@@ -91,9 +91,6 @@ public class RCTMGLStyleFactory {
91
91
  }
92
92
  });
93
93
  break;
94
- case "fillPatternTransition":
95
- RCTMGLStyleFactory.setFillPatternTransition(layer, styleValue);
96
- break;
97
94
  }
98
95
  }
99
96
  }
@@ -174,9 +171,6 @@ public class RCTMGLStyleFactory {
174
171
  case "lineDasharray":
175
172
  RCTMGLStyleFactory.setLineDasharray(layer, styleValue);
176
173
  break;
177
- case "lineDasharrayTransition":
178
- RCTMGLStyleFactory.setLineDasharrayTransition(layer, styleValue);
179
- break;
180
174
  case "linePattern":
181
175
  style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() {
182
176
  @Override
@@ -189,9 +183,6 @@ public class RCTMGLStyleFactory {
189
183
  }
190
184
  });
191
185
  break;
192
- case "linePatternTransition":
193
- RCTMGLStyleFactory.setLinePatternTransition(layer, styleValue);
194
- break;
195
186
  case "lineGradient":
196
187
  RCTMGLStyleFactory.setLineGradient(layer, styleValue);
197
188
  break;
@@ -593,9 +584,6 @@ public class RCTMGLStyleFactory {
593
584
  }
594
585
  });
595
586
  break;
596
- case "fillExtrusionPatternTransition":
597
- RCTMGLStyleFactory.setFillExtrusionPatternTransition(layer, styleValue);
598
- break;
599
587
  case "fillExtrusionHeight":
600
588
  RCTMGLStyleFactory.setFillExtrusionHeight(layer, styleValue);
601
589
  break;
@@ -752,9 +740,6 @@ public class RCTMGLStyleFactory {
752
740
  }
753
741
  });
754
742
  break;
755
- case "backgroundPatternTransition":
756
- RCTMGLStyleFactory.setBackgroundPatternTransition(layer, styleValue);
757
- break;
758
743
  case "backgroundOpacity":
759
744
  RCTMGLStyleFactory.setBackgroundOpacity(layer, styleValue);
760
745
  break;
@@ -1018,14 +1003,6 @@ public class RCTMGLStyleFactory {
1018
1003
  }
1019
1004
  }
1020
1005
 
1021
-
1022
- public static void setFillPatternTransition(FillLayer layer, RCTMGLStyleValue styleValue) {
1023
- StyleTransition transition = styleValue.getTransition();
1024
- if (transition != null) {
1025
- layer.fillPatternTransition(transition);
1026
- }
1027
- }
1028
-
1029
1006
  public static void setLineCap(LineLayer layer, RCTMGLStyleValue styleValue) {
1030
1007
  if (styleValue.isExpression()) {
1031
1008
  layer.lineCap(styleValue.getExpression());
@@ -1198,14 +1175,6 @@ public class RCTMGLStyleFactory {
1198
1175
  }
1199
1176
  }
1200
1177
 
1201
-
1202
- public static void setLineDasharrayTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
1203
- StyleTransition transition = styleValue.getTransition();
1204
- if (transition != null) {
1205
- layer.lineDasharrayTransition(transition);
1206
- }
1207
- }
1208
-
1209
1178
  public static void setLinePattern(LineLayer layer, RCTMGLStyleValue styleValue) {
1210
1179
  if (styleValue.isExpression()) {
1211
1180
  if (styleValue.isImageStringValue()) {
@@ -1218,14 +1187,6 @@ public class RCTMGLStyleFactory {
1218
1187
  }
1219
1188
  }
1220
1189
 
1221
-
1222
- public static void setLinePatternTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
1223
- StyleTransition transition = styleValue.getTransition();
1224
- if (transition != null) {
1225
- layer.linePatternTransition(transition);
1226
- }
1227
- }
1228
-
1229
1190
  public static void setLineGradient(LineLayer layer, RCTMGLStyleValue styleValue) {
1230
1191
  if (styleValue.isExpression()) {
1231
1192
  layer.lineGradient(styleValue.getExpression());
@@ -2090,14 +2051,6 @@ public class RCTMGLStyleFactory {
2090
2051
  }
2091
2052
  }
2092
2053
 
2093
-
2094
- public static void setFillExtrusionPatternTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2095
- StyleTransition transition = styleValue.getTransition();
2096
- if (transition != null) {
2097
- layer.fillExtrusionPatternTransition(transition);
2098
- }
2099
- }
2100
-
2101
2054
  public static void setFillExtrusionHeight(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2102
2055
  if (styleValue.isExpression()) {
2103
2056
  layer.fillExtrusionHeight(styleValue.getExpression());
@@ -2370,14 +2323,6 @@ public class RCTMGLStyleFactory {
2370
2323
  }
2371
2324
  }
2372
2325
 
2373
-
2374
- public static void setBackgroundPatternTransition(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
2375
- StyleTransition transition = styleValue.getTransition();
2376
- if (transition != null) {
2377
- layer.backgroundPatternTransition(transition);
2378
- }
2379
- }
2380
-
2381
2326
  public static void setBackgroundOpacity(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
2382
2327
  if (styleValue.isExpression()) {
2383
2328
  layer.backgroundOpacity(styleValue.getExpression());
@@ -38,7 +38,6 @@
38
38
  - (void)setFillTranslateTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
39
39
  - (void)setFillTranslateAnchor:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
40
40
  - (void)setFillPattern:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
41
- - (void)setFillPatternTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
42
41
  - (void)setLineCap:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
43
42
  - (void)setLineJoin:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
44
43
  - (void)setLineMiterLimit:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
@@ -61,9 +60,7 @@
61
60
  - (void)setLineBlur:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
62
61
  - (void)setLineBlurTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
63
62
  - (void)setLineDasharray:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
64
- - (void)setLineDasharrayTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
65
63
  - (void)setLinePattern:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
66
- - (void)setLinePatternTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
67
64
  - (void)setLineGradient:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
68
65
  - (void)setSymbolPlacement:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
69
66
  - (void)setSymbolSpacing:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
@@ -171,7 +168,6 @@
171
168
  - (void)setFillExtrusionTranslateTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
172
169
  - (void)setFillExtrusionTranslateAnchor:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
173
170
  - (void)setFillExtrusionPattern:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
174
- - (void)setFillExtrusionPatternTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
175
171
  - (void)setFillExtrusionHeight:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
176
172
  - (void)setFillExtrusionHeightTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
177
173
  - (void)setFillExtrusionBase:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
@@ -207,7 +203,6 @@
207
203
  - (void)setBackgroundColor:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
208
204
  - (void)setBackgroundColorTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
209
205
  - (void)setBackgroundPattern:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
210
- - (void)setBackgroundPatternTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
211
206
  - (void)setBackgroundOpacity:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
212
207
  - (void)setBackgroundOpacityTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
213
208
  - (void)setAnchor:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
@@ -71,8 +71,6 @@
71
71
  }
72
72
  }];
73
73
  }
74
- } else if ([prop isEqualToString:@"fillPatternTransition"]) {
75
- [self setFillPatternTransition:layer withReactStyleValue:styleValue];
76
74
  } else {
77
75
  // TODO throw exception
78
76
  }
@@ -138,8 +136,6 @@
138
136
  [self setLineBlurTransition:layer withReactStyleValue:styleValue];
139
137
  } else if ([prop isEqualToString:@"lineDasharray"]) {
140
138
  [self setLineDasharray:layer withReactStyleValue:styleValue];
141
- } else if ([prop isEqualToString:@"lineDasharrayTransition"]) {
142
- [self setLineDasharrayTransition:layer withReactStyleValue:styleValue];
143
139
  } else if ([prop isEqualToString:@"linePattern"]) {
144
140
  if (![styleValue shouldAddImage]) {
145
141
  [self setLinePattern:layer withReactStyleValue:styleValue];
@@ -157,8 +153,6 @@
157
153
  }
158
154
  }];
159
155
  }
160
- } else if ([prop isEqualToString:@"linePatternTransition"]) {
161
- [self setLinePatternTransition:layer withReactStyleValue:styleValue];
162
156
  } else if ([prop isEqualToString:@"lineGradient"]) {
163
157
  [self setLineGradient:layer withReactStyleValue:styleValue];
164
158
  } else {
@@ -487,8 +481,6 @@
487
481
  }
488
482
  }];
489
483
  }
490
- } else if ([prop isEqualToString:@"fillExtrusionPatternTransition"]) {
491
- [self setFillExtrusionPatternTransition:layer withReactStyleValue:styleValue];
492
484
  } else if ([prop isEqualToString:@"fillExtrusionHeight"]) {
493
485
  [self setFillExtrusionHeight:layer withReactStyleValue:styleValue];
494
486
  } else if ([prop isEqualToString:@"fillExtrusionHeightTransition"]) {
@@ -637,8 +629,6 @@
637
629
  }
638
630
  }];
639
631
  }
640
- } else if ([prop isEqualToString:@"backgroundPatternTransition"]) {
641
- [self setBackgroundPatternTransition:layer withReactStyleValue:styleValue];
642
632
  } else if ([prop isEqualToString:@"backgroundOpacity"]) {
643
633
  [self setBackgroundOpacity:layer withReactStyleValue:styleValue];
644
634
  } else if ([prop isEqualToString:@"backgroundOpacityTransition"]) {
@@ -752,11 +742,6 @@
752
742
  layer.fillPattern = styleValue.mglStyleValue;
753
743
  }
754
744
 
755
- - (void)setFillPatternTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
756
- {
757
- layer.fillPatternTransition = [styleValue getTransition];
758
- }
759
-
760
745
 
761
746
 
762
747
  - (void)setLineCap:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
@@ -869,21 +854,11 @@
869
854
  layer.lineDashPattern = styleValue.mglStyleValue;
870
855
  }
871
856
 
872
- - (void)setLineDasharrayTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
873
- {
874
- layer.lineDashPatternTransition = [styleValue getTransition];
875
- }
876
-
877
857
  - (void)setLinePattern:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
878
858
  {
879
859
  layer.linePattern = styleValue.mglStyleValue;
880
860
  }
881
861
 
882
- - (void)setLinePatternTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
883
- {
884
- layer.linePatternTransition = [styleValue getTransition];
885
- }
886
-
887
862
  - (void)setLineGradient:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
888
863
  {
889
864
  layer.lineGradient = styleValue.mglStyleValue;
@@ -1427,11 +1402,6 @@
1427
1402
  layer.fillExtrusionPattern = styleValue.mglStyleValue;
1428
1403
  }
1429
1404
 
1430
- - (void)setFillExtrusionPatternTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
1431
- {
1432
- layer.fillExtrusionPatternTransition = [styleValue getTransition];
1433
- }
1434
-
1435
1405
  - (void)setFillExtrusionHeight:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
1436
1406
  {
1437
1407
  layer.fillExtrusionHeight = styleValue.mglStyleValue;
@@ -1613,11 +1583,6 @@
1613
1583
  layer.backgroundPattern = styleValue.mglStyleValue;
1614
1584
  }
1615
1585
 
1616
- - (void)setBackgroundPatternTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
1617
- {
1618
- layer.backgroundPatternTransition = [styleValue getTransition];
1619
- }
1620
-
1621
1586
  - (void)setBackgroundOpacity:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
1622
1587
  {
1623
1588
  layer.backgroundOpacity = styleValue.mglStyleValue;
@@ -57,7 +57,9 @@ class RCTMGLLocationManager : LocationProviderDelegate {
57
57
  }
58
58
 
59
59
  func setDistanceFilter(_ distanceFilter: CLLocationDistance) {
60
- provider.locationProviderOptions.distanceFilter = distanceFilter
60
+ var options = provider.locationProviderOptions
61
+ options.distanceFilter = distanceFilter
62
+ provider.locationProviderOptions = options
61
63
  }
62
64
 
63
65
  func start() {
@@ -242,8 +244,8 @@ class RCTMGLLocationModule: RCTEventEmitter, RCTMGLLocationManagerDelegate {
242
244
  }
243
245
 
244
246
  @objc func start(_ minDisplacement: CLLocationDistance) {
247
+ if minDisplacement >= 0.0 { locationManager.setDistanceFilter(minDisplacement) }
245
248
  locationManager.start()
246
- locationManager.setDistanceFilter(minDisplacement)
247
249
  }
248
250
 
249
251
  @objc func stop() {
@@ -74,8 +74,6 @@ func fillLayer(layer: inout FillLayer, reactStyle:Dictionary<String, Any>, apply
74
74
  }
75
75
  });
76
76
  }
77
- } else if (prop == "fillPatternTransition") {
78
- self.setFillPatternTransition(&layer, styleValue:styleValue);
79
77
  } else {
80
78
  Logger.log(level:.error, message: "Unexpected property \(prop) for layer: fill")
81
79
  }
@@ -141,8 +139,6 @@ func lineLayer(layer: inout LineLayer, reactStyle:Dictionary<String, Any>, apply
141
139
  self.setLineBlurTransition(&layer, styleValue:styleValue);
142
140
  } else if (prop == "lineDasharray") {
143
141
  self.setLineDasharray(&layer, styleValue:styleValue);
144
- } else if (prop == "lineDasharrayTransition") {
145
- self.setLineDasharrayTransition(&layer, styleValue:styleValue);
146
142
  } else if (prop == "linePattern") {
147
143
  if (!styleValue.shouldAddImage()) {
148
144
  self.setLinePattern(&layer, styleValue:styleValue);
@@ -166,8 +162,6 @@ func lineLayer(layer: inout LineLayer, reactStyle:Dictionary<String, Any>, apply
166
162
  }
167
163
  });
168
164
  }
169
- } else if (prop == "linePatternTransition") {
170
- self.setLinePatternTransition(&layer, styleValue:styleValue);
171
165
  } else if (prop == "lineGradient") {
172
166
  self.setLineGradient(&layer, styleValue:styleValue);
173
167
  } else if (prop == "lineTrimOffset") {
@@ -512,8 +506,6 @@ func fillExtrusionLayer(layer: inout FillExtrusionLayer, reactStyle:Dictionary<S
512
506
  }
513
507
  });
514
508
  }
515
- } else if (prop == "fillExtrusionPatternTransition") {
516
- self.setFillExtrusionPatternTransition(&layer, styleValue:styleValue);
517
509
  } else if (prop == "fillExtrusionHeight") {
518
510
  self.setFillExtrusionHeight(&layer, styleValue:styleValue);
519
511
  } else if (prop == "fillExtrusionHeightTransition") {
@@ -668,8 +660,6 @@ func backgroundLayer(layer: inout BackgroundLayer, reactStyle:Dictionary<String,
668
660
  }
669
661
  });
670
662
  }
671
- } else if (prop == "backgroundPatternTransition") {
672
- self.setBackgroundPatternTransition(&layer, styleValue:styleValue);
673
663
  } else if (prop == "backgroundOpacity") {
674
664
  self.setBackgroundOpacity(&layer, styleValue:styleValue);
675
665
  } else if (prop == "backgroundOpacityTransition") {
@@ -926,11 +916,6 @@ func setFillPattern(_ layer: inout FillLayer, styleValue: RCTMGLStyleValue)
926
916
 
927
917
  }
928
918
 
929
- func setFillPatternTransition(_ layer: inout FillLayer, styleValue: RCTMGLStyleValue)
930
- {
931
- layer.fillPatternTransition = styleValue.getTransition();
932
- }
933
-
934
919
 
935
920
 
936
921
  func setLineCap(_ layer: inout LineLayer, styleValue: RCTMGLStyleValue)
@@ -1099,11 +1084,6 @@ func setLineDasharray(_ layer: inout LineLayer, styleValue: RCTMGLStyleValue)
1099
1084
 
1100
1085
  }
1101
1086
 
1102
- func setLineDasharrayTransition(_ layer: inout LineLayer, styleValue: RCTMGLStyleValue)
1103
- {
1104
- layer.lineDasharrayTransition = styleValue.getTransition();
1105
- }
1106
-
1107
1087
  func setLinePattern(_ layer: inout LineLayer, styleValue: RCTMGLStyleValue)
1108
1088
  {
1109
1089
 
@@ -1113,11 +1093,6 @@ func setLinePattern(_ layer: inout LineLayer, styleValue: RCTMGLStyleValue)
1113
1093
 
1114
1094
  }
1115
1095
 
1116
- func setLinePatternTransition(_ layer: inout LineLayer, styleValue: RCTMGLStyleValue)
1117
- {
1118
- layer.linePatternTransition = styleValue.getTransition();
1119
- }
1120
-
1121
1096
  func setLineGradient(_ layer: inout LineLayer, styleValue: RCTMGLStyleValue)
1122
1097
  {
1123
1098
 
@@ -1987,11 +1962,6 @@ func setFillExtrusionPattern(_ layer: inout FillExtrusionLayer, styleValue: RCTM
1987
1962
 
1988
1963
  }
1989
1964
 
1990
- func setFillExtrusionPatternTransition(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
1991
- {
1992
- layer.fillExtrusionPatternTransition = styleValue.getTransition();
1993
- }
1994
-
1995
1965
  func setFillExtrusionHeight(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
1996
1966
  {
1997
1967
 
@@ -2249,11 +2219,6 @@ func setBackgroundPattern(_ layer: inout BackgroundLayer, styleValue: RCTMGLStyl
2249
2219
 
2250
2220
  }
2251
2221
 
2252
- func setBackgroundPatternTransition(_ layer: inout BackgroundLayer, styleValue: RCTMGLStyleValue)
2253
- {
2254
- layer.backgroundPatternTransition = styleValue.getTransition();
2255
- }
2256
-
2257
2222
  func setBackgroundOpacity(_ layer: inout BackgroundLayer, styleValue: RCTMGLStyleValue)
2258
2223
  {
2259
2224
 
@@ -0,0 +1 @@
1
+ https://github.com/rnmapbox/maps/issues/2254
@@ -142,6 +142,8 @@ class UserLocation extends React.Component {
142
142
  async componentDidMount() {
143
143
  this._isMounted = true;
144
144
 
145
+ locationManager.setMinDisplacement(this.props.minDisplacement);
146
+
145
147
  await this.setLocationManager({
146
148
  running: this.needsLocationManagerRunning(),
147
149
  });
@@ -149,8 +151,6 @@ class UserLocation extends React.Component {
149
151
  if (this.renderMode === UserLocation.RenderMode.Native) {
150
152
  return;
151
153
  }
152
-
153
- locationManager.setMinDisplacement(this.props.minDisplacement);
154
154
  }
155
155
 
156
156
  async componentDidUpdate(prevProps) {
@@ -64,7 +64,18 @@ class LocationManager {
64
64
  this.stop();
65
65
  }
66
66
 
67
- start(displacement = 0) {
67
+ start(displacement = -1) {
68
+ if (
69
+ displacement === -1 ||
70
+ displacement === null ||
71
+ displacement === undefined
72
+ ) {
73
+ displacement = this._minDisplacement;
74
+ }
75
+ if (displacement == null) {
76
+ displacement = -1;
77
+ }
78
+
68
79
  if (!this._isListening) {
69
80
  MapboxGLLocationManager.start(displacement);
70
81
 
@@ -88,6 +99,7 @@ class LocationManager {
88
99
  }
89
100
 
90
101
  setMinDisplacement(minDisplacement) {
102
+ this._minDisplacement = minDisplacement;
91
103
  MapboxGLLocationManager.setMinDisplacement(minDisplacement);
92
104
  }
93
105
 
@@ -484,16 +484,14 @@ export interface FillLayerStyleProps {
484
484
  *
485
485
  * @requires fillTranslate
486
486
  */
487
- fillTranslateAnchor?: Value<Translation, ['zoom']>;
487
+ fillTranslateAnchor?: Value<
488
+ Enum<FillTranslateAnchorEnum, FillTranslateAnchorEnumValues>,
489
+ ['zoom']
490
+ >;
488
491
  /**
489
492
  * Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
490
493
  */
491
494
  fillPattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
492
-
493
- /**
494
- * The transition affecting any changes to this layer’s fillPattern property.
495
- */
496
- fillPatternTransition?: Transition;
497
495
  }
498
496
  export interface LineLayerStyleProps {
499
497
  /**
@@ -554,7 +552,10 @@ export interface LineLayerStyleProps {
554
552
  *
555
553
  * @requires lineTranslate
556
554
  */
557
- lineTranslateAnchor?: Value<Translation, ['zoom']>;
555
+ lineTranslateAnchor?: Value<
556
+ Enum<LineTranslateAnchorEnum, LineTranslateAnchorEnumValues>,
557
+ ['zoom']
558
+ >;
558
559
  /**
559
560
  * Stroke thickness.
560
561
  */
@@ -597,20 +598,10 @@ export interface LineLayerStyleProps {
597
598
  * @disabledBy linePattern
598
599
  */
599
600
  lineDasharray?: Value<number[], ['zoom', 'feature']>;
600
-
601
- /**
602
- * The transition affecting any changes to this layer’s lineDasharray property.
603
- */
604
- lineDasharrayTransition?: Transition;
605
601
  /**
606
602
  * Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
607
603
  */
608
604
  linePattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
609
-
610
- /**
611
- * The transition affecting any changes to this layer’s linePattern property.
612
- */
613
- linePatternTransition?: Transition;
614
605
  /**
615
606
  * Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.
616
607
  *
@@ -970,7 +961,10 @@ export interface SymbolLayerStyleProps {
970
961
  *
971
962
  * @requires iconImage, iconTranslate
972
963
  */
973
- iconTranslateAnchor?: Value<Translation, ['zoom']>;
964
+ iconTranslateAnchor?: Value<
965
+ Enum<IconTranslateAnchorEnum, IconTranslateAnchorEnumValues>,
966
+ ['zoom']
967
+ >;
974
968
  /**
975
969
  * The opacity at which the text will be drawn.
976
970
  *
@@ -1042,7 +1036,10 @@ export interface SymbolLayerStyleProps {
1042
1036
  *
1043
1037
  * @requires textField, textTranslate
1044
1038
  */
1045
- textTranslateAnchor?: Value<Translation, ['zoom']>;
1039
+ textTranslateAnchor?: Value<
1040
+ Enum<TextTranslateAnchorEnum, TextTranslateAnchorEnumValues>,
1041
+ ['zoom']
1042
+ >;
1046
1043
  }
1047
1044
  export interface CircleLayerStyleProps {
1048
1045
  /**
@@ -1103,7 +1100,10 @@ export interface CircleLayerStyleProps {
1103
1100
  *
1104
1101
  * @requires circleTranslate
1105
1102
  */
1106
- circleTranslateAnchor?: Value<Translation, ['zoom']>;
1103
+ circleTranslateAnchor?: Value<
1104
+ Enum<CircleTranslateAnchorEnum, CircleTranslateAnchorEnumValues>,
1105
+ ['zoom']
1106
+ >;
1107
1107
  /**
1108
1108
  * Controls the scaling behavior of the circle when the map is pitched.
1109
1109
  */
@@ -1226,16 +1226,17 @@ export interface FillExtrusionLayerStyleProps {
1226
1226
  *
1227
1227
  * @requires fillExtrusionTranslate
1228
1228
  */
1229
- fillExtrusionTranslateAnchor?: Value<Translation, ['zoom']>;
1229
+ fillExtrusionTranslateAnchor?: Value<
1230
+ Enum<
1231
+ FillExtrusionTranslateAnchorEnum,
1232
+ FillExtrusionTranslateAnchorEnumValues
1233
+ >,
1234
+ ['zoom']
1235
+ >;
1230
1236
  /**
1231
1237
  * Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
1232
1238
  */
1233
1239
  fillExtrusionPattern?: Value<ResolvedImageType, ['zoom', 'feature']>;
1234
-
1235
- /**
1236
- * The transition affecting any changes to this layer’s fillExtrusionPattern property.
1237
- */
1238
- fillExtrusionPatternTransition?: Transition;
1239
1240
  /**
1240
1241
  * The height with which to extrude this layer.
1241
1242
  */
@@ -1408,11 +1409,6 @@ export interface BackgroundLayerStyleProps {
1408
1409
  * Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
1409
1410
  */
1410
1411
  backgroundPattern?: Value<ResolvedImageType, ['zoom']>;
1411
-
1412
- /**
1413
- * The transition affecting any changes to this layer’s backgroundPattern property.
1414
- */
1415
- backgroundPatternTransition?: Transition;
1416
1412
  /**
1417
1413
  * The opacity at which the background will be drawn.
1418
1414
  */