I am using GMS to show map locations in my iOS app using the following code. The position of the camera is not centered at marker position but it is slightly north(around 5 miles) of it. How can I center camera position to center on marker?
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: latitude!, longitude:longitude!)
let camera = GMSCameraPosition.camera(withTarget: marker.position, zoom: 10.0)
let mapView = GMSMapView.map(withFrame: view.bounds, camera: camera)
marker.map = mapView
cell.mapView.addSubview(mapView)
Above is the initial location of the map.
The marker is south of the initial view.