【发布时间】:2020-07-03 00:35:40
【问题描述】:
我尝试了所有谷歌地图提供的动画方法。但我无法为地图视图的缩放级别设置动画。我试过 mapView.animateToZoom(15)。还有
UIView.animateWithDuration(5.0, animations: {
let zoomIn = GMSCameraUpdate.zoomTo(15)
self.mapView.animateToZoom(15)
})
但我无法实现动画。我也关注了GMSMapView animateToCameraPosition zoom in - zoom out animation
但没有希望。有人可以帮忙吗?
【问题讨论】:
-
我猜这是因为
GMSMapView不是由 UIKit 组成的。反正animateToZoom已经是动画了。为什么UIView的动画块中需要它? -
我只是尝试在 UIView 的动画块中使用它!简单地使用 self.mapView.animateToZoom(15) 不会为地图视图设置动画
标签: ios swift google-maps