小编Abh*_*Jha的帖子

iOS中使用GMSAutocompleteFetcherDelegate时如何查找经度和纬度

根据 Place Autocomplete 文档,预测数组的对象没有位置信息。那么我应该如何获取经度和纬度的详细信息。下面是我的代码 -

extension ViewController: GMSAutocompleteFetcherDelegate {


func didAutocomplete(with predictions: [GMSAutocompletePrediction]) {

    tableData.removeAll()

    for prediction in predictions{

        tableData.append(prediction.attributedFullText.string)

    }
    locationTable.reloadData()
}

func didFailAutocompleteWithError(_ error: Error) {
    print(error.localizedDescription)
}
Run Code Online (Sandbox Code Playgroud)

google-maps ios swift

4
推荐指数
1
解决办法
1591
查看次数

标签 统计

google-maps ×1

ios ×1

swift ×1