|
求助.getNameFromCoords方法在ios系统上用不了,已根据getLocation方法获取到了定位的经纬度了,但是getNameFromCoords没有根据经纬度转化成城市名称,在安卓上管用但是在IOS上没有反应
if (systemType == 'ios') {
bMap.initMapSDK(function (ret, err) {
if (ret) {
bMap.getLocation({
accuracy: '100m',
autoStop: true,
filter: 1
}, function (ret, err) {
console.log(JSON.stringify(ret))
console.log(JSON.stringify(err))
if (ret.status) {
bMap.getNameFromCoords({
lon: ret.lon,
lat: ret.lat,
}, function (res, err) {
if (res.status) {
city = res.city
console.log(JSON.stringify(res.city+"111"))
}
});
}
});
}
});
} |
|