react-native-maps 1.21.0-alpha.17 → 1.21.0-alpha.19

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.
@@ -39,8 +39,6 @@ const NSInteger AIRMapMaxZoomLevel = 20;
39
39
  @property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView;
40
40
  @property (nonatomic, assign) NSNumber *shouldZoomEnabled;
41
41
  @property (nonatomic, assign) NSNumber *shouldScrollEnabled;
42
- @property (nonatomic, strong) MKCompassButton *defaultCompassButton;
43
- @property (nonatomic, strong) MKCompassButton *overlayCompassButton;
44
42
 
45
43
  - (void)updateScrollEnabled;
46
44
  - (void)updateZoomEnabled;
@@ -53,7 +51,7 @@ const NSInteger AIRMapMaxZoomLevel = 20;
53
51
  BOOL _initialRegionSet;
54
52
  BOOL _initialCameraSet;
55
53
  BOOL _initialized;
56
-
54
+
57
55
  // Array to manually track RN subviews
58
56
  //
59
57
  // AIRMap implicitly creates subviews that aren't regular RN children
@@ -71,7 +69,7 @@ const NSInteger AIRMapMaxZoomLevel = 20;
71
69
  if ((self = [super init])) {
72
70
  _hasStartedRendering = NO;
73
71
  _reactSubviews = [NSMutableArray new];
74
-
72
+
75
73
  // Find Apple link label
76
74
  for (UIView *subview in self.subviews) {
77
75
  if ([NSStringFromClass(subview.class) isEqualToString:@"MKAttributionLabel"]) {
@@ -81,12 +79,12 @@ const NSInteger AIRMapMaxZoomLevel = 20;
81
79
  break;
82
80
  }
83
81
  }
84
-
82
+
85
83
  // 3rd-party callout view for MapKit that has more options than the built-in. It's painstakingly built to
86
84
  // be identical to the built-in callout view (which has a private API)
87
85
  self.calloutView = [SMCalloutView platformCalloutView];
88
86
  self.calloutView.delegate = self;
89
-
87
+
90
88
  self.minZoom = 0;
91
89
  self.maxZoom = AIRMapMaxZoomLevel;
92
90
  self.compassOffset = CGPointMake(0, 0);
@@ -252,16 +250,16 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
252
250
  // Allow touches to be sent to our calloutview.
253
251
  // See this for some discussion of why we need to override this: https://github.com/nfarina/calloutview/pull/9
254
252
  - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
255
-
253
+
256
254
  CGPoint touchPoint = [self.calloutView convertPoint:point fromView:self];
257
255
  UIView *touchedView = [self.calloutView hitTest:touchPoint withEvent:event];
258
-
256
+
259
257
  if (touchedView) {
260
258
  UIWindow* win = [[[UIApplication sharedApplication] windows] firstObject];
261
259
  AIRMapCalloutSubview* calloutSubview = nil;
262
260
  AIRMapCallout* callout = nil;
263
261
  AIRMapMarker* marker = nil;
264
-
262
+
265
263
  UIView* tmp = touchedView;
266
264
  while (tmp && tmp != win && tmp != self.calloutView) {
267
265
  if ([tmp respondsToSelector:@selector(onPress)]) {
@@ -273,7 +271,7 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
273
271
  }
274
272
  tmp = tmp.superview;
275
273
  }
276
-
274
+
277
275
  if (callout) {
278
276
  marker = [self markerForCallout:callout];
279
277
  if (marker) {
@@ -283,36 +281,36 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
283
281
  }
284
282
  }
285
283
  }
286
-
284
+
287
285
  return calloutSubview ? calloutSubview : touchedView;
288
286
  }
289
-
287
+
290
288
  return [super hitTest:point withEvent:event];
291
289
  }
292
290
 
293
291
  #pragma mark SMCalloutViewDelegate
294
292
 
295
293
  - (NSTimeInterval)calloutView:(SMCalloutView *)calloutView delayForRepositionWithSize:(CGSize)offset {
296
-
294
+
297
295
  // When the callout is being asked to present in a way where it or its target will be partially offscreen, it asks us
298
296
  // if we'd like to reposition our surface first so the callout is completely visible. Here we scroll the map into view,
299
297
  // but it takes some math because we have to deal in lon/lat instead of the given offset in pixels.
300
-
298
+
301
299
  CLLocationCoordinate2D coordinate = self.region.center;
302
-
300
+
303
301
  // where's the center coordinate in terms of our view?
304
302
  CGPoint center = [self convertCoordinate:coordinate toPointToView:self];
305
-
303
+
306
304
  // move it by the requested offset
307
305
  center.x -= offset.width;
308
306
  center.y -= offset.height;
309
-
307
+
310
308
  // and translate it back into map coordinates
311
309
  coordinate = [self convertPoint:center toCoordinateFromView:self];
312
-
310
+
313
311
  // move the map!
314
312
  [self setCenterCoordinate:coordinate animated:YES];
315
-
313
+
316
314
  // tell the callout to wait for a while while we scroll (we assume the scroll delay for MKMapView matches UIScrollView)
317
315
  return kSMCalloutViewRepositionDelayForUIScrollView;
318
316
  }
@@ -322,10 +320,10 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
322
320
  - (NSArray *)getMapBoundaries
323
321
  {
324
322
  MKMapRect mapRect = self.visibleMapRect;
325
-
323
+
326
324
  CLLocationCoordinate2D northEast = MKCoordinateForMapPoint(MKMapPointMake(MKMapRectGetMaxX(mapRect), mapRect.origin.y));
327
325
  CLLocationCoordinate2D southWest = MKCoordinateForMapPoint(MKMapPointMake(mapRect.origin.x, MKMapRectGetMaxY(mapRect)));
328
-
326
+
329
327
  return @[
330
328
  @[
331
329
  [NSNumber numberWithDouble:northEast.longitude],
@@ -340,7 +338,7 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
340
338
  - (NSDictionary *) getPointForCoordinates:(CLLocationCoordinate2D) location
341
339
  {
342
340
  CGPoint touchPoint = [self convertCoordinate:location toPointToView:self];
343
-
341
+
344
342
  return @{
345
343
  @"x": @(touchPoint.x),
346
344
  @"y": @(touchPoint.y),
@@ -353,7 +351,7 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
353
351
  @"latitude": @(coordinate.latitude),
354
352
  @"longitude": @(coordinate.longitude),
355
353
  };
356
-
354
+
357
355
  }
358
356
 
359
357
  - (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible {
@@ -395,9 +393,9 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
395
393
  - (void)takeSnapshotWithConfig:(NSDictionary *)config
396
394
  callback:(RCTPromiseResolveBlock) callback
397
395
  {
398
-
396
+
399
397
  MKMapSnapshotOptions *options = [[MKMapSnapshotOptions alloc] init];
400
-
398
+
401
399
  options.mapType = self.mapType;
402
400
  NSNumber *width = config[@"width"];
403
401
  NSNumber *height = config[@"height"];
@@ -405,14 +403,14 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
405
403
  NSString*format =config[@"format"];
406
404
  NSString*result =config[@"result"];
407
405
  MKCoordinateRegion region = [RCTConvert MKCoordinateRegion:config[@"region"]];
408
-
406
+
409
407
 
410
408
  options.region = (region.center.latitude && region.center.longitude) ? region : self.region;
411
409
  options.size = CGSizeMake(
412
410
  ([width floatValue] == 0) ? self.bounds.size.width : [width floatValue],
413
411
  ([height floatValue] == 0) ? self.bounds.size.height : [height floatValue]
414
412
  );
415
-
413
+
416
414
  options.scale = [[UIScreen mainScreen] scale];
417
415
 
418
416
 
@@ -455,16 +453,16 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
455
453
  [overlay drawToSnapshot:snapshot context:UIGraphicsGetCurrentContext()];
456
454
  }
457
455
  }
458
-
456
+
459
457
  for (id <MKAnnotation> annotation in self.annotations) {
460
458
  CGPoint point = [snapshot pointForCoordinate:annotation.coordinate];
461
-
459
+
462
460
  MKAnnotationView* anView = [self viewForAnnotation: annotation];
463
-
461
+
464
462
  if (anView){
465
463
  pin = anView;
466
464
  }
467
-
465
+
468
466
  if (CGRectContainsPoint(rect, point)) {
469
467
  point.x = point.x + pin.centerOffset.x - (pin.bounds.size.width / 2.0f);
470
468
  point.y = point.y + pin.centerOffset.y - (pin.bounds.size.height / 2.0f);
@@ -554,7 +552,7 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
554
552
  if (!CLLocationCoordinate2DIsValid(region.center)) {
555
553
  return;
556
554
  }
557
-
555
+
558
556
  // If new span values are nil, use old values instead
559
557
  if (!region.span.latitudeDelta) {
560
558
  region.span.latitudeDelta = self.region.span.latitudeDelta;
@@ -562,7 +560,7 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
562
560
  if (!region.span.longitudeDelta) {
563
561
  region.span.longitudeDelta = self.region.span.longitudeDelta;
564
562
  }
565
-
563
+
566
564
  // Animate/move to new position
567
565
  [super setRegion:region animated:animated];
568
566
  }
@@ -633,25 +631,25 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
633
631
 
634
632
  - (void)setCameraZoomRange:(NSDictionary *)cameraZoomRange {
635
633
  if (@available(iOS 13.0, *)) {
636
-
634
+
637
635
  if (cameraZoomRange == nil) {
638
636
  cameraZoomRange = @{};
639
637
  }
640
-
638
+
641
639
  NSNumber *minValue = cameraZoomRange[@"minCenterCoordinateDistance"];
642
640
  NSNumber *maxValue = cameraZoomRange[@"maxCenterCoordinateDistance"];
643
-
641
+
644
642
  if (minValue == nil && maxValue == nil) {
645
643
  self.legacyZoomConstraintsEnabled = YES;
646
-
644
+
647
645
  MKMapCameraZoomRange *defaultZoomRange = [[MKMapCameraZoomRange alloc] initWithMinCenterCoordinateDistance:MKMapCameraZoomDefault maxCenterCoordinateDistance:MKMapCameraZoomDefault];
648
646
  [super setCameraZoomRange:defaultZoomRange animated:NO];
649
-
647
+
650
648
  return;
651
649
  }
652
-
650
+
653
651
  MKMapCameraZoomRange *zoomRange = nil;
654
-
652
+
655
653
  if (minValue != nil && maxValue != nil) {
656
654
  zoomRange = [[MKMapCameraZoomRange alloc] initWithMinCenterCoordinateDistance:[minValue doubleValue] maxCenterCoordinateDistance:[maxValue doubleValue]];
657
655
  } else if (minValue != nil) {
@@ -659,61 +657,14 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
659
657
  } else if (maxValue != nil) {
660
658
  zoomRange = [[MKMapCameraZoomRange alloc] initWithMaxCenterCoordinateDistance:[maxValue doubleValue]];
661
659
  }
662
-
660
+
663
661
  BOOL animated = [cameraZoomRange[@"animated"] boolValue];
664
-
662
+
665
663
  self.legacyZoomConstraintsEnabled = NO;
666
664
  [super setCameraZoomRange:zoomRange animated:animated];
667
665
  }
668
666
  }
669
667
 
670
- // Include properties of MKMapView which are only available on iOS 9+
671
- // and check if their selector is available before calling super method.
672
-
673
- - (void)setShowsCompass:(BOOL)showsCompass {
674
- if (self.overlayCompassButton != nil) {
675
- self.overlayCompassButton.compassVisibility = showsCompass ? MKFeatureVisibilityAdaptive : MKFeatureVisibilityHidden;
676
- }
677
- if ([MKMapView instancesRespondToSelector:@selector(setShowsCompass:)]) {
678
- [super setShowsCompass:showsCompass];
679
- }
680
- }
681
-
682
- - (BOOL)showsCompass {
683
- if ([MKMapView instancesRespondToSelector:@selector(showsCompass)]) {
684
- return [super showsCompass];
685
- } else {
686
- return NO;
687
- }
688
- }
689
-
690
- - (void)setShowsScale:(BOOL)showsScale {
691
- if ([MKMapView instancesRespondToSelector:@selector(setShowsScale:)]) {
692
- [super setShowsScale:showsScale];
693
- }
694
- }
695
-
696
- - (BOOL)showsScale {
697
- if ([MKMapView instancesRespondToSelector:@selector(showsScale)]) {
698
- return [super showsScale];
699
- } else {
700
- return NO;
701
- }
702
- }
703
-
704
- - (void)setShowsTraffic:(BOOL)showsTraffic {
705
- if ([MKMapView instancesRespondToSelector:@selector(setShowsTraffic:)]) {
706
- [super setShowsTraffic:showsTraffic];
707
- }
708
- }
709
-
710
- - (BOOL)showsTraffic {
711
- if ([MKMapView instancesRespondToSelector:@selector(showsTraffic)]) {
712
- return [super showsTraffic];
713
- } else {
714
- return NO;
715
- }
716
- }
717
668
 
718
669
  - (void)setScrollEnabled:(BOOL)scrollEnabled {
719
670
  self.shouldScrollEnabled = [NSNumber numberWithBool:scrollEnabled];
@@ -759,7 +710,7 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
759
710
  else {
760
711
  self.cacheImageView.image = nil;
761
712
  self.cacheImageView.hidden = YES;
762
-
713
+
763
714
  dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
764
715
  self.cacheImageView.image = nil;
765
716
  self.cacheImageView.hidden = YES;
@@ -767,12 +718,12 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
767
718
  [self.layer renderInContext:UIGraphicsGetCurrentContext()];
768
719
  UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
769
720
  UIGraphicsEndImageContext();
770
-
721
+
771
722
  self.cacheImageView.image = image;
772
723
  self.cacheImageView.hidden = NO;
773
724
  });
774
725
  }
775
-
726
+
776
727
  [self updateScrollEnabled];
777
728
  [self updateZoomEnabled];
778
729
  [self updateLegalLabelInsets];
@@ -868,50 +819,27 @@ MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordina
868
819
  - (void)layoutSubviews {
869
820
  [super layoutSubviews];
870
821
  [self cacheViewIfNeeded];
871
-
872
- if (self.overlayCompassButton == nil) {
873
- for (UIView *subview in self.subviews) {
874
- if (![NSStringFromClass(subview.class) isEqualToString:@"MKPassThroughStackView"]) continue;
875
- self.overlayCompassButton = [MKCompassButton compassButtonWithMapView:self];
876
- [subview addSubview:self.overlayCompassButton];
877
- self.overlayCompassButton.frame = CGRectMake(self.overlayCompassButton.frame.origin.x + _compassOffset.x, self.overlayCompassButton.frame.origin.y + _compassOffset.y, self.overlayCompassButton.frame.size.width, self.overlayCompassButton.frame.size.height);
878
- break;
879
- }
880
- }
881
-
882
- if (self.defaultCompassButton == nil) {
883
- for (UIView *subview in self.subviews) {
884
- if (![NSStringFromClass(subview.class) isEqualToString:@"MKPassThroughStackView"]) continue;
885
- for (UIView *subview2 in subview.subviews) {
886
- if (![NSStringFromClass(subview2.class) isEqualToString:@"MKCompassView"]) continue;
887
- self.defaultCompassButton = subview2;
888
- self.defaultCompassButton.hidden = YES;
889
- }
890
- break;
891
- }
892
- }
893
-
894
822
  }
895
823
 
896
824
  // based on https://medium.com/@dmytrobabych/getting-actual-rotation-and-zoom-level-for-mapkit-mkmapview-e7f03f430aa9
897
825
  - (CGFloat)getZoomLevel {
898
826
  CGFloat cameraAngle = self.camera.heading;
899
-
827
+
900
828
  if (cameraAngle > 270) {
901
829
  cameraAngle = 360 - cameraAngle;
902
830
  } else if (cameraAngle > 90) {
903
831
  cameraAngle = fabs(cameraAngle - 180);
904
832
  }
905
-
833
+
906
834
  CGFloat angleRad = M_PI * cameraAngle / 180; // map rotation in radians
907
835
  CGFloat width = self.frame.size.width;
908
836
  CGFloat height = self.frame.size.height;
909
837
  CGFloat heightOffset = 20; // the offset (status bar height) which is taken by MapKit into consideration to calculate visible area height
910
-
838
+
911
839
  // calculating Longitude span corresponding to normal (non-rotated) width
912
840
  CGFloat spanStraight = width * self.region.span.longitudeDelta / (width * cos(angleRad) + (height - heightOffset) * sin(angleRad));
913
841
  int normalizingFactor = 512;
914
-
842
+
915
843
  return log2(360 * ((width / normalizingFactor) / spanStraight));
916
844
  }
917
845
 
@@ -471,14 +471,9 @@ newViewProps.name.right); \
471
471
 
472
472
  REMAP_MAPVIEW_PROP(followsUserLocation)
473
473
  REMAP_MAPVIEW_PROP(loadingEnabled)
474
- if (_view.scrollEnabled != newViewProps.scrollEnabled){
475
- [_view setScrollEnabled:newViewProps.scrollEnabled];
476
- }
477
- if (_view.handlePanDrag != newViewProps.handlePanDrag){
478
- [_view setHandlePanDrag:newViewProps.handlePanDrag];
479
- }
480
474
 
481
475
  REMAP_MAPVIEW_PROP(scrollEnabled)
476
+ REMAP_MAPVIEW_PROP(handlePanDrag)
482
477
 
483
478
  REMAP_MAPVIEW_PROP(maxDelta)
484
479
  REMAP_MAPVIEW_PROP(maxZoom)
@@ -487,7 +482,6 @@ newViewProps.name.right); \
487
482
 
488
483
  REMAP_MAPVIEW_PROP(showsCompass)
489
484
  REMAP_MAPVIEW_PROP(showsScale)
490
- REMAP_MAPVIEW_PROP(showsTraffic)
491
485
  REMAP_MAPVIEW_PROP(showsUserLocation)
492
486
  REMAP_MAPVIEW_PROP(userLocationCalloutEnabled)
493
487
  REMAP_MAPVIEW_PROP(zoomEnabled)
package/lib/MapView.d.ts CHANGED
@@ -426,7 +426,7 @@ export type MapViewProps = ViewProps & {
426
426
  * If `false` compass won't be displayed on the map.
427
427
  *
428
428
  * @default true
429
- * @platform iOS: Supported
429
+ * @platform iOS: Supported (adaptive on Apple Maps, visible only if map is not pointing north)
430
430
  * @platform Android: Supported
431
431
  */
432
432
  showsCompass?: boolean;
@@ -454,32 +454,14 @@ export type MapViewProps = ViewProps & {
454
454
  * @platform Android: Supported
455
455
  */
456
456
  showsMyLocationButton?: boolean;
457
- /**
458
- * If `false` points of interest won't be displayed on the map.
459
- * TODO: DEPRECATED? Doesn't seem to do anything
460
- *
461
- * @default true
462
- * @platform iOS: Maybe Apple Maps?
463
- * @platform Android: Not supported
464
- */
465
- showsPointsOfInterest?: boolean;
466
457
  /**
467
458
  * A Boolean indicating whether the map shows scale information.
468
459
  *
469
- * @default true
460
+ * @default false
470
461
  * @platform iOS: Apple Maps only
471
462
  * @platform Android: Not supported
472
463
  */
473
464
  showsScale?: boolean;
474
- /**
475
- * A Boolean value indicating whether the map displays traffic information.
476
- * TODO: Look into android support
477
- *
478
- * @default false
479
- * @platform iOS: Supported
480
- * @platform Android: Not supported?
481
- */
482
- showsTraffic?: boolean;
483
465
  /**
484
466
  * If `true` the users location will be displayed on the map.
485
467
  *
@@ -447,7 +447,7 @@ export interface MapFabricNativeProps extends ViewProps {
447
447
  * @platform iOS: Not supported
448
448
  * @platform Android: Supported
449
449
  */
450
- moveOnMarkerPress?: boolean;
450
+ moveOnMarkerPress?: WithDefault<boolean, true>;
451
451
  /**
452
452
  * Callback that is called when a callout is tapped by the user.
453
453
  *
@@ -625,7 +625,7 @@ export interface MapFabricNativeProps extends ViewProps {
625
625
  * @platform iOS: Google Maps only
626
626
  * @platform Android: Supported
627
627
  */
628
- pitchEnabled?: boolean;
628
+ pitchEnabled?: WithDefault<boolean, true>;
629
629
  /**
630
630
  * The region to be displayed by the map.
631
631
  * The region is defined by the center coordinates and the span of coordinates to display.
@@ -641,7 +641,7 @@ export interface MapFabricNativeProps extends ViewProps {
641
641
  * @platform iOS: Google Maps only
642
642
  * @platform Android: Supported
643
643
  */
644
- rotateEnabled?: boolean;
644
+ rotateEnabled?: WithDefault<boolean, true>;
645
645
  /**
646
646
  * If `false` the map will stay centered while rotating or zooming.
647
647
  *
@@ -649,7 +649,7 @@ export interface MapFabricNativeProps extends ViewProps {
649
649
  * @platform iOS: Google Maps only
650
650
  * @platform Android: Supported
651
651
  */
652
- scrollDuringRotateOrZoomEnabled?: boolean;
652
+ scrollDuringRotateOrZoomEnabled?: WithDefault<boolean, true>;
653
653
  /**
654
654
  * If `false` the user won't be able to change the map region being displayed.
655
655
  *
@@ -657,7 +657,7 @@ export interface MapFabricNativeProps extends ViewProps {
657
657
  * @platform iOS: Supported
658
658
  * @platform Android: Supported
659
659
  */
660
- scrollEnabled?: boolean;
660
+ scrollEnabled?: WithDefault<boolean, true>;
661
661
  /**
662
662
  * A Boolean indicating whether the map displays extruded building information.
663
663
  *
@@ -665,7 +665,7 @@ export interface MapFabricNativeProps extends ViewProps {
665
665
  * @platform iOS: Not supported
666
666
  * @platform Android: Supported
667
667
  */
668
- showsBuildings?: boolean;
668
+ showsBuildings?: WithDefault<boolean, true>;
669
669
  /**
670
670
  * If `false` compass won't be displayed on the map.
671
671
  *
@@ -673,7 +673,7 @@ export interface MapFabricNativeProps extends ViewProps {
673
673
  * @platform iOS: Supported
674
674
  * @platform Android: Supported
675
675
  */
676
- showsCompass?: boolean;
676
+ showsCompass?: WithDefault<boolean, true>;
677
677
  /**
678
678
  * A Boolean indicating whether indoor level picker should be enabled.
679
679
  *
@@ -689,7 +689,7 @@ export interface MapFabricNativeProps extends ViewProps {
689
689
  * @platform iOS: Google Maps only
690
690
  * @platform Android: Supported
691
691
  */
692
- showsIndoors?: boolean;
692
+ showsIndoors?: WithDefault<boolean, true>;
693
693
  /**
694
694
  * If `false` hide the button to move map to the current user's location.
695
695
  *
@@ -697,33 +697,15 @@ export interface MapFabricNativeProps extends ViewProps {
697
697
  * @platform iOS: Google Maps only
698
698
  * @platform Android: Supported
699
699
  */
700
- showsMyLocationButton?: boolean;
701
- /**
702
- * If `false` points of interest won't be displayed on the map.
703
- * TODO: DEPRECATED? Doesn't seem to do anything
704
- *
705
- * @default true
706
- * @platform iOS: Maybe Apple Maps?
707
- * @platform Android: Not supported
708
- */
709
- showsPointsOfInterest?: boolean;
700
+ showsMyLocationButton?: WithDefault<boolean, true>;
710
701
  /**
711
702
  * A Boolean indicating whether the map shows scale information.
712
703
  *
713
- * @default true
704
+ * @default false
714
705
  * @platform iOS: Apple Maps only
715
706
  * @platform Android: Not supported
716
707
  */
717
708
  showsScale?: boolean;
718
- /**
719
- * A Boolean value indicating whether the map displays traffic information.
720
- * TODO: Look into android support
721
- *
722
- * @default false
723
- * @platform iOS: Supported
724
- * @platform Android: Not supported?
725
- */
726
- showsTraffic?: boolean;
727
709
  /**
728
710
  * If `true` the users location will be displayed on the map.
729
711
  *
@@ -749,7 +731,7 @@ export interface MapFabricNativeProps extends ViewProps {
749
731
  * @platform iOS: Not supported
750
732
  * @platform Android: Supported
751
733
  */
752
- toolbarEnabled?: boolean;
734
+ toolbarEnabled?: WithDefault<boolean, true>;
753
735
  /**
754
736
  * Sets the map to the style selected.
755
737
  *
@@ -785,7 +767,7 @@ export interface MapFabricNativeProps extends ViewProps {
785
767
  * @platform iOS: Not supported
786
768
  * @platform Android: Supported
787
769
  */
788
- userLocationFastestInterval?: Int32;
770
+ userLocationFastestInterval?: WithDefault<Int32, 5000>;
789
771
  /**
790
772
  * Set power priority of user location tracking.
791
773
  *
@@ -805,7 +787,7 @@ export interface MapFabricNativeProps extends ViewProps {
805
787
  * @platform iOS: Not supported
806
788
  * @platform Android: Supported
807
789
  */
808
- userLocationUpdateInterval?: Int32;
790
+ userLocationUpdateInterval?: WithDefault<Int32, 5000>;
809
791
  /**
810
792
  * If `false` the zoom control at the bottom right of the map won't be visible.
811
793
  *
@@ -813,7 +795,7 @@ export interface MapFabricNativeProps extends ViewProps {
813
795
  * @platform iOS: Not supported
814
796
  * @platform Android: Supported
815
797
  */
816
- zoomControlEnabled?: boolean;
798
+ zoomControlEnabled?: WithDefault<boolean, true>;
817
799
  /**
818
800
  * If `false` the user won't be able to pinch/zoom the map.
819
801
  *
@@ -823,7 +805,7 @@ export interface MapFabricNativeProps extends ViewProps {
823
805
  * @platform iOS: Supported
824
806
  * @platform Android: Supported
825
807
  */
826
- zoomEnabled?: boolean;
808
+ zoomEnabled?: WithDefault<boolean, true>;
827
809
  /**
828
810
  * If `false` the user won't be able to double tap to zoom the map.
829
811
  * **Note:** But it will greatly decrease delay of tap gesture recognition.
@@ -832,7 +814,7 @@ export interface MapFabricNativeProps extends ViewProps {
832
814
  * @platform iOS: Google Maps only
833
815
  * @platform Android: Not supported
834
816
  */
835
- zoomTapEnabled?: boolean;
817
+ zoomTapEnabled?: WithDefault<boolean, true>;
836
818
  /**
837
819
  * Map camera distance limits. `minCenterCoordinateDistance` for minimum distance, `maxCenterCoordinateDistance` for maximum.
838
820
  * `animated` for animated zoom changes.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "lib/index.js",
6
6
  "author": "Leland Richardson <leland.m.richardson@gmail.com>",
7
7
  "homepage": "https://github.com/react-native-maps/react-native-maps#readme",
8
- "version": "1.21.0-alpha.17",
8
+ "version": "1.21.0-alpha.19",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",