我正在使用Mapbox,并且我试图在用户移动期间跟踪用户。但是如何让相机转向与现实生活中用户相同的方向呢?
//Create a new MKMapCamera object
let newCameraPosition = MGLMapCamera(lookingAtCenterCoordinate: mapView.centerCoordinate, fromDistance: mapView.camera.altitude + 65, pitch: 70, heading: 0)
// Then you could call it like this
mapView.camera = newCameraPosition
// Track users location
self.mapView.setUserTrackingMode(MGLUserTrackingMode.Follow, animated: true);
谢谢!