Swift从GoogleMaps SDK for iOS检索地点ID

时间:2016-01-09 11:44:23

标签: ios swift google-maps

我已获得某个地点的GPS坐标,并想查询GoogleMaps SDK中的地方ID,以获取有关某个地点的更多信息。

我查看了文档https://developers.google.com/places/place-id。但是,却没有找到一种方便的方式'得到地方ID,如:

let placeId = GMSService.getPlaceIdFromCoordinates(longitude: 02.52324, latitude: 03.5345)

1 个答案:

答案 0 :(得分:0)

Google地图和地方信息API的iOS文档未列出GMSService,唯一类似于GMSServices的类没有getPlaceIdFromCoordinates

您可以查看Places API文档的Place IDs and Details。可以从GMSPlace对象中检索PlaceID。

要实际搜索地点(无论是通过文字还是坐标),您可以试用文档的Place Autocomplete页面。

相关问题