我尝试了谷歌地图提供的所有动画方法。但我无法为地图视图的缩放级别设置动画。我试过mapView.animateToZoom(15)。还
UIView.animateWithDuration(5.0, animations: {
let zoomIn = GMSCameraUpdate.zoomTo(15)
self.mapView.animateToZoom(15)
})
但我没能实现动画。我也跟着GMSMapView animateToCameraPosition zoom in - zoom out animation
但没有希望。有人可以帮忙吗?
答案 0 :(得分:4)
经过多次努力,我设法为GMSMapView设置了动画:以下是参考代码:
mapView.camera = GMSCameraPosition.cameraWithLatitude(58.998400,longitude: 10.035604, zoom: 1)
CATransaction.begin()
CATransaction.setValue(2.0, forKey: kCATransactionAnimationDuration)
let city = GMSCameraPosition.cameraWithLatitude(58.998400,longitude: 10.035604, zoom: 15)
self.mapView.animateToCameraPosition(city)
CATransaction.commit()
答案 1 :(得分:0)
更新为快速5
toolchain.py build python3
toolchain.py build kivy