相机在 map 中的当前位置始终位于中心。请检查屏幕 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)
}
谢谢
最佳答案
您可以通过为 map View 提供填充来实现这一点。
let mapInsets = UIEdgeInsets(top: 20.0, left: 0.0, bottom: 150, right: 0.0)
self?.mapView.padding = mapInsets
关于ios - 将相机移动到底部 GMSMapView IOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53407573/