Skip to content

Commit

Permalink
fix(ios,camera): apply camera changes when no center or bounds specif…
Browse files Browse the repository at this point in the history
…ied (rnmapbox#3415)
  • Loading branch information
mfazekas authored Mar 9, 2024
1 parent 2a98da2 commit f4a501c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ios/RNMBX/RNMBXCamera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,15 @@ open class RNMBXCamera : RNMBXMapComponentBase {
pitch: pitch ?? map.mapboxMap.cameraState.pitch
)
}
} else {
camera = CameraOptions(
center: nil,
padding: padding,
anchor: nil,
zoom: zoom,
bearing: heading,
pitch: pitch
)
}

guard let camera = camera else {
Expand Down

0 comments on commit f4a501c

Please sign in to comment.