【已解决】:wx.getLocation()调用报错,文档查不到对应错误码,能否帮忙定位一下?
发布于 5 年前 作者 yanluo 1439 次浏览 来自 官方Issues

已解决

因为  getSystemInfo 显示的 "locationEnabled": false, 说明系统定位开关没开启。

调用方法: 

wx.getLocation({

type: 'gcj02',

// ...

fail 钩子里的响应:

"errMsg": "getLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF",

"errCode": 2

用户手机信息:

  "brand": "vivo",

  "model": "V1936A",

  "weChatVersion": "7.0.16",

"system": "Android 10",

  "cameraAuthorized": true,

  "locationAuthorized": true,

  "bluetoothEnabled": false,

  "locationEnabled": false,

  "wifiEnabled": false,



1 回复

通过这个提示是指周围没有基站并且没有连接wifi拿不到位置信息

建议 type 改为: "wgs84"试下

回到顶部