Skip to content

Commit 6ebe01e

Browse files
marcelkalveramrborn
marcelkalveram
authored andcommittedOct 1, 2018
fix fitToSuppliedMarkers function (react-native-maps#2524)
Fixes react-native-maps#2513
1 parent a0e67b8 commit 6ebe01e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed
 

‎lib/ios/AirGoogleMaps/AIRGoogleMapManager.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ - (UIView *)view
236236
CGFloat bottom = [RCTConvert CGFloat:edgePadding[@"bottom"]];
237237
CGFloat left = [RCTConvert CGFloat:edgePadding[@"left"]];
238238

239-
[mapView animateWithCameraUpdate:[GMSCameraUpdate fitBounds:bounds withPadding:55.0f withEdgeInsets:UIEdgeInsetsMake(top, left, bottom, right)]];
239+
[mapView animateWithCameraUpdate:[GMSCameraUpdate fitBounds:bounds withEdgeInsets:UIEdgeInsetsMake(top, left, bottom, right)]];
240240
}
241241
}];
242242
}

‎lib/ios/AirMaps/AIRMapManager.m

+1-6
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,7 @@ - (UIView *)view
271271

272272
NSArray *filteredMarkers = [mapView.annotations filteredArrayUsingPredicate:filterMarkers];
273273

274-
CGFloat top = [RCTConvert CGFloat:edgePadding[@"top"]];
275-
CGFloat right = [RCTConvert CGFloat:edgePadding[@"right"]];
276-
CGFloat bottom = [RCTConvert CGFloat:edgePadding[@"bottom"]];
277-
CGFloat left = [RCTConvert CGFloat:edgePadding[@"left"]];
278-
279-
[mapView showAnnotations:filteredMarkers edgePadding:UIEdgeInsetsMake(top, left, bottom, right) animated:animated];
274+
[mapView showAnnotations:filteredMarkers animated:animated];
280275

281276
}
282277
}];

0 commit comments

Comments
 (0)
Please sign in to comment.