目前相机在地图中的位置始终如此.请检查屏幕1.
我想用偏移将相机固定到底部,就像屏幕2一样.
任何帮助将不胜感激.
let carBearing = self.getBearingBetweenTwoCoordinates(coordinate1: coordinate1, coordinate2: coordinate2)
self.carMarker.position = coordinate1
let camera = GMSCameraPosition.camera(withTarget: coordinate1, zoom: Constants.GoogleMapInfo.KZOOM_LEVEL_20, bearing: carBearing, viewingAngle: 65)
DispatchQueue.main.async{
self.mapView.animate(to: camera)
}
谢谢
最佳答案 您可以通过为mapview提供填充来实现此目的.
let mapInsets = UIEdgeInsets(top: 20.0, left: 0.0, bottom: 150, right: 0.0)
self?.mapView.padding = mapInsets