Skip to content

Commit c68fadb

Browse files
unoskrborn
authored andcommitted
[iOS GoogleMap] Fix animateCamera (react-native-maps#2608)
Fixed a bug that zoom and heading will always be 0 if they are not included in the argument of animateCamera
1 parent 5d17d39 commit c68fadb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ + (GMSCameraPosition*)GMSCameraPositionWithDefaults:(id)json existingCamera:(GMS
4242
viewingAngle = existingCamera.viewingAngle;
4343
latitude = existingCamera.target.latitude;
4444
longitude = existingCamera.target.longitude;
45-
zoom = 0;
46-
bearing = 0;
45+
zoom = existingCamera.zoom;
46+
bearing = existingCamera.bearing;
4747
}
4848

4949
if (json[@"center"]) {

0 commit comments

Comments
 (0)