void SetCompassHeadingValue(float headingValue) { if (mapView.AutoRotateEnabled) { mapView.SetRotateAngle(headingValue, true); } }
public override void ViewWillTransitionToSize(CGSize toSize, IUIViewControllerTransitionCoordinator coordinator) { if (toSize.Width != View.Frame.Size.Width) { if (mapView.AutoRotateEnabled && hasInit) { viewAngle = (float)mapView.RotateAngle(); mapView.SetAutoRotateEnabled(false, false); coordinator.AnimateAlongsideTransition ( (context) => { if (hasInit) { mapView.SetAutoRotateEnabled(true, true); mapView.SetRotateAngle(viewAngle); } }, null ); } } }