在 react native 中使用 Geocoder 获取地址时出现此错误:
Object { "code": 4, "message": "地理编码时服务器出错。接收到的数据位于错误的'origin'字段中。检查它以获取更多信息。", "origin": Object { "results":数组 [], "status": "ZERO_RESULTS", }, }
我正在使用“react-native-geocoding”依赖项
我的代码包括在这里:
Geocoder.init(GOOGLE_API_KEY); //google api key
Geocoder.from(latitude,longitude)
.then(json => {
var addressComponent = json.results[0].address_components;
console.log(JSON.stringify(addressComponent));
})
.catch(error => console.warn(error));
Run Code Online (Sandbox Code Playgroud)
需要一些帮助?
我是grails应用程序的新工作.我对这个 - > grails中的运算符感到困惑.谁能给我一个明确的概念呢?或者给我任何关于这方面的参考资料对我来说很容易.我已经在阅读在线文档和一些书籍,但我仍然对此运算符和用法感到困惑.