ios - 在 iOS Swift 2.1 中适合谷歌地图 View 以包含多边形的最佳方法?

标签 ios xcode swift google-maps swift2

让谷歌地图 View 在 **Swift 2.1** 中显示整个多边形(或路径)的最佳方式是什么?

最佳答案

试试这个会有帮助的..

let bounds = GMSCoordinateBounds(path: path)
self.mapView!.animateWithCameraUpdate(GMSCameraUpdate.fitBounds(bounds, withPadding: 15.0))

关于ios - 在 iOS Swift 2.1 中适合谷歌地图 View 以包含多边形的最佳方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35428732/

相关文章:

ios - 向导航栏添加阴影的问题

iOS 10 模拟器不能在代理后面工作

ios - map View :rendererForOverlay delegate method never called when addOverlay is called on MKMapView

ios - 是否可以更改折线图上的点大小?

swift - TVOS - ScrollView 内的 UICollectionView - ScrollView 不滚动

ios - 使用 Swift 4.0 编译的模块无法在 Swift 4.0.1 中导入

ios - 无法使用带 Cardboard SDK 的 Kudan AR Unity 插件在 iOS 应用程序上渲染视频纹理

json - Swift 从 Dictionary of Dictionary 中删除 optional

ios - 如何使用 Swift 更改 UIButton 的字体

iphone - icuke 与 xcode 4 次