1

我正在使用 Google Places Autocomplete 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。我怎样才能将这一点变成距中心 NE 和 SW 英里的 2 点?

4

0 回答 0