首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >离子2中的逆向地理编码对象

离子2中的逆向地理编码对象
EN

Stack Overflow用户
提问于 2017-05-31 06:06:56
回答 1查看 272关注 0票数 0

当我用这个的时候

代码语言:javascript
复制
this.nativeGeocoder.reverseGeocode(parseFloat(this.myLat),parseFloat( this.myLong))
  .then((result: NativeGeocoderReverseResult) =>
  { console.log('The address is ' + result.street + ' in ' + result.countryCode)

在一个叫做构造函数的函数中-

地址是未命名的路in result.street不工作!

EN

回答 1

Stack Overflow用户

发布于 2018-03-03 15:28:20

您必须将result.street更新为result.street,这样才能工作。

代码语言:javascript
复制
this.nativeGeocoder.reverseGeocode(parseFloat(this.myLat),parseFloat( this.myLong))
  .then((result: NativeGeocoderReverseResult) =>
  { console.log('The address is ' + result.street + ' in ' + result.countryCode)

代码语言:javascript
复制
this.nativeGeocoder.reverseGeocode(parseFloat(this.myLat),parseFloat( this.myLong))
  .then((result: NativeGeocoderReverseResult) =>
  { console.log('The address is ' + result[0].street + ' in ' + result[0].countryCode)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44276893

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档