Ionic2 离子2号卫星反向地理编码的目标

Ionic2 离子2号卫星反向地理编码的目标,ionic2,Ionic2,当我用这个的时候 this.nativeGeocoder.reverseGeocode(parseFloat(this.myLat),parseFloat( this.myLong)) .then((result: NativeGeocoderReverseResult) => { console.log('The address is ' + result.street + ' in ' + result.countryCode) 在构造函数中调用的函数中,我得到- 地址为中的

当我用这个的时候

this.nativeGeocoder.reverseGeocode(parseFloat(this.myLat),parseFloat( this.myLong))
  .then((result: NativeGeocoderReverseResult) =>
  { console.log('The address is ' + result.street + ' in ' + result.countryCode)
在构造函数中调用的函数中,我得到-

地址为中的未命名道路 结果。street不工作
!

必须将result.street更新为result[0].street 它会起作用的

这个

this.nativeGeocoder.reverseGeocode(parseFloat(this.myLat),parseFloat( this.myLong))
  .then((result: NativeGeocoderReverseResult) =>
  { console.log('The address is ' + result.street + ' in ' + result.countryCode)
this.nativeGeocoder.reverseGeocode(parseFloat(this.myLat),parseFloat( this.myLong))
  .then((result: NativeGeocoderReverseResult) =>
  { console.log('The address is ' + result[0].street + ' in ' + result[0].countryCode)