小程序获取地理位置功能?

小程序 文章 2021-03-11 18:01 426 0 全屏看文

AI助手支持GPT4.0

小程序获取地理位置功能?How to obtain geographic location function in mini program?

小程序获取地理位置功能?

小程序里面的获取地理位置的功能:

若用户关闭定位服务,能否在小程序内开启设置“地理位置”开关按钮?

The function of getting geographical location in the applet: if the user turns off the location service, can the "geographical location" switch button be set in the applet?

回答:

正周:

不行的

Runaway:那只能怪用户操作不当了么?π_π
默垂眸:

那你就用wx.openSetting让用户跳转设置自行打开啊

跨商通:

可以wx.openSetting啊,让用户重新打开

神奇的桑桑😄😄😄:

可以在调用地理位置的接口前再次判断用户是否授权地理位置。

Runaway:首次进入肯定是没授权的,开启不了手机自带的设置-定位服务,始终没法获取位置。

-EOF-

AI助手支持GPT4.0