1.配置了百度appkey.
2.代码如下 :
plus.geolocation.getCurrentPosition(geoInf, function(e) {
console.log("获取定位位置信息失败:" + e.message);
}, { geocode: true, provider: 'baidu' });
function geoInf(position) {
console.log(JSON.stringify(position));
}
3.打印的内容
{"coordsType":"bd09ll","address":{},"coords":{"latitude":37.007188,"longitude":110.575603,"accuracy":1,"altitude":0,"heading":null,"speed":0,"altitudeAccuracy":0},"timestamp":1498028087000}
address为什么获取不到城市地址。
1 个回复
小明子
更新一下SDK