当前位置:网站首页>微信小程序监听实时地理位置变化事件接口申请
微信小程序监听实时地理位置变化事件接口申请
2022-07-24 21:34:00 【wwwwestcn】
监听实时地理位置变化事件,需结合 wx.startLocationUpdateBackground、wx.startLocationUpdate使用。
申请开通
暂只针对国内主体如下类目的小程序开放,需要先通过类目审核,再在小程序管理后台,「开发」-「开发管理」-「接口设置」中自助开通该接口权限。 接口权限申请入口将于2022年3月11日开始内测,于3月31日全量上线。并从4月18日开始,在代码审核环节将检测该接口是否已完成开通,如未开通,将在代码提审环节进行拦截。
| 一级类目/主体类型 | 二级类目 | 应用场景 |
|---|---|---|
| 电商平台 | / | 售卖商品发货、收货服务 |
| 商家自营 | / | 售卖商品发货、收货服务 |
| 医疗服务 | 公立医疗机构、三级私立医疗机构、其他私立医疗机构、就医服务、其他医学健康服务、药品(非处方药)销售、非处方药销售平台、医疗器械生产企业、医疗器械自营、医疗器械经营销售平台、互联网医院血液、干细胞服务、临床试验 | 1、实际物品/药品接收服务 2、附近医院查询服务 |
| 交通服务 | / | 代驾服务、租车网点查询、附近车辆查询等相关服务 |
| 生活服务 | / | 上门服务作业等线下场景 |
| 物流服务 | 收件/派件、查件、邮政、装卸搬运、快递柜、货物运输 | 快递/货物收发服务 |
| 餐饮服务 | 点餐平台、外卖平台 | 线下送餐服务 |
| 工具 | 天气、信息查询 | 与地理位置相关的服务,比如潮汐查询、海拔查询、天气查询等 |
| 政务民生 | / | 提供政务单位相关业务 |
| 政府主体帐号 | / | 提供政务单位相关业务 |
参数
function callback
实时地理位置变化事件的回调函数
参数
Object res
| 属性 | 类型 | 说明 | 最低版本 |
|---|---|---|---|
| latitude | number | 纬度,范围为 -90~90,负数表示南纬。使用 gcj02 国测局坐标系 | |
| longitude | number | 经度,范围为 -180~180,负数表示西经。使用 gcj02 国测局坐标系 | |
| speed | number | 速度,单位 m/s | |
| accuracy | number | 位置的精确度 | |
| altitude | number | 高度,单位 m | 1.2.0 |
| verticalAccuracy | number | 垂直精度,单位 m(Android 无法获取,返回 0) | 1.2.0 |
| horizontalAccuracy | number | 水平精度,单位 m | 1.2.0 |
示例代码
const _locationChangeFn = function(res) {
console.log('location change', res)
}
wx.onLocationChange(_locationChangeFn)
wx.offLocationChange(_locationChangeFn)边栏推荐
- 【Pyspark基础】行转列和列转行(超多列时)
- One bite of Stream(6)
- ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘ (10061)
- APR learning failure problem location and troubleshooting
- Detailed OSPF configuration of layer 3 switch / router [Huawei ENSP experiment]
- C local functions and yield statements
- IO flow overview
- rogabet note 1.1
- Drawing library Matplotlib drawing
- what? Does the multi merchant system not adapt to app? This is coming!
猜你喜欢

Day5: three pointers describe a tree

【类的组合(在一个类中定义一个类)】

Multiplication and addition of univariate polynomials

Information system project manager must recite the core examination site (47) project subcontract

Little Red Book Keyword Search commodity list API interface (commodity detail page API interface)
![[CCNA experiment sharing] routing between VLANs of layer 3 switches](/img/71/2f28c6b6b62f273fad1b3d71e648a1.jpg)
[CCNA experiment sharing] routing between VLANs of layer 3 switches

CAD sets hyperlinks to entities (WEB version)

01_ UE4 advanced_ PBR material

Information System Project Manager - Chapter 10 project communication management and project stakeholder management

Uniqueness and ordering in set
随机推荐
2018mysql technology Q & a collection, hoping to give some help to students who like MySQL
Atcoder beginer contest 260 a~f problem solution
C synchronous asynchronous callback state machine async await demo
[blind box app mall system] function introduction after online unpacking
Experience of using dump file to reverse locate crash location
Get data in batches according to time
Shenzhen Merchants Securities account opening? Is it safe to open a mobile account?
Little Red Book Keyword Search commodity list API interface (commodity detail page API interface)
Brand new: the latest ranking of programming languages in July
Five common misuse of async/await
Lecun proposed that mask strategy can also be applied to twin networks based on vit for self supervised learning!
How to gracefully realize regular backup of MySQL database (glory Collection Edition)
Which bank outlet in Zhejiang can buy ETF fund products?
How to realize three schemes of finclip wechat authorized login
Information system project manager must recite the core examination site (47) project subcontract
String matching (Huawei)
Mathpix formula extractor
One bite of Stream(7)
Top 10 in China's HCI software market: Huawei, Xinhua, Shenxin, VMware, Lenovo, smartx, Inspur, Qingyun, lutanli, dawn
C local functions and yield statements