我正在使用以下代码在自定义 UIView 中创建 GMSMapView 实例作为子视图
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:position.latitude
longitude:position.latitude
zoom:CAMZOOM];
if(camera)
{
self.googleMapView = [GMSMapView mapWithFrame:self.frame camera:camera];
self.googleMapView.myLocationEnabled = YES;
self.googleMapView.delegate=self;
}
我在这个视图中添加了多个 UIbutton 和 GMSMarker,它们是可见的,没有任何问题,但我经常得到如下的地图绘制(发生)
我有触发动画到当前位置的按钮(参考以下代码),地图绘制没有任何问题
[self.googleMapView animateToLocation:self.googleMapView.myLocation.coordinate];
固定的
在我删除视图动画(alpha 0.0 到 1.0,持续时间 1 秒)后,这个问题得到了修复。现在我的地图实例加载闪烁,但我可以忍受。