从Google API获得单独的地址字段?

Ric*_*ier 5 android google-maps-api-3 google-places-api google-places

鉴于其特定的ID,Google Places API可以返回有关特定位置的详细信息:

Places.GeoDataApi.getPlaceById(mGoogleApiClient, placeId)
Run Code Online (Sandbox Code Playgroud)

回调中返回的数据实现Place接口,使用以下方法以逗号分隔的字符串形式访问地址:

Place.getAddress()
Run Code Online (Sandbox Code Playgroud)

将该字符串解析为街道,郊区,省,镇等的字段是不可靠的,因为字符串格式不一致:

  • Ranelagh Rd,开普敦,南非(街道,郊区,国家)
  • 1st Ave,Kenilworth,开普敦,7708,南非(街道,郊区,城镇,邮政编码,国家)
  • 美国佛罗里达州33991,开普科勒尔SW 23rd Terrace (街道,城镇,邮政编码,国家/地区)

是否有可靠的方法可以从Google获取解析的地址信息?