微信小程序wx.getLocation获取定位错误汇总

获取当前的地理位置、速度。

fail返回的对象 errMsg 可能返回的值

‘getLocation:fail auth deny’,'getLocation:fail:auth denied','getLocation:fail authorize no response' :用户在小程序中未授权 (新老版本、平台返回不同)

‘getLocation:fail system permission denied’:未给微信位置授权

‘getLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF’:没开启系统定位

‘getLocation:fail:ERROR_NETWORK’:网络异常

‘getLocation:fail:timeout‘:定位超时