在使用该getPlacePredictions
功能时AutocompleteService
,每个结果都包含一个description
字段。
例如,查询“time square”时,第一个结果有一个description
是“Times Square, Manhattan, NY, USA”。
保存place_id
此结果并将其用于 上的getDetails
函数后PlacesService
,同一位置不包含该description
字段,而是一个名为formatted_address
包含一个名为“Manhattan, NY 10036, USA”的字段。
AutocompleteService
使用时如何获取使用 收到的原始描述PlacesService
?