我正在使用Google商家信息自动填充API,并希望使用Google的示例为API调用设置界限:
// Set bounds to inner-west Sydney Australia.
let neBoundsCorner = CLLocationCoordinate2D(latitude: -33.843366,
longitude: 151.134002)
let swBoundsCorner = CLLocationCoordinate2D(latitude: -33.875725,
longitude: 151.200349)
let bounds = GMSCoordinateBounds(coordinate: neBoundsCorner,
coordinate: swBoundsCorner)
但是我想从用户的当前位置设置我的界限,我将其存储为CLLocation。如何将这一点从中心转为2点x英里NE和SW?