当前位置:网站首页>Use and arrangement of wechat applet coordinate position interface (I)
Use and arrangement of wechat applet coordinate position interface (I)
2022-06-13 02:55:00 【Tianma 3798】
Use and arrangement of coordinate position interface of wechat applet
Common location scenarios :
1. Get current location coordinate
2. Check the location 、 Navigation
3. Select location 、 coordinate
4. analysis / Inverse analysis Location 《=》 coordinate
5. Route planning
One 、 Get current location ,wx.getLocation()
official API:wx.getLocation(Object object) | Wechat open documents
Support applet mobile terminal ,windows Computer terminal ,mac Computer terminal .
Use cases :
// Get current location
wx.getLocation({
success: res => {
console.info(res);
},
fail: res => {
console.error(res);
}
})
In particular : The location in the applet needs to be authorized by the user , It is required to use the instructions in the configuration general settings .
app.json The configuration is as follows : The description can be modified by itself
"permission": {
"scope.userLocation": {
"desc": " Your location information will be used to show the effect of the applet location interface "
}
}
Two 、wx.openLocation(Object object) Map open position navigation
Official website API:wx.openLocation(Object object) | Wechat open documents
Support applet mobile terminal ,Mac Computer terminal
// Get current location
wx.getLocation({
success: res => {
console.info(res);
// Open position
wx.openLocation({
latitude: res.latitude,
longitude: res.longitude,
name: ' Stephen ',
address: '12341234'
})
},
fail: res => {
console.error(res);
}
})
3、 ... and 、wx.chooseLocation(Object object) Select location , Select Business District
official API:wx.chooseLocation(Object object) | Wechat open documents
Only the mobile side of the applet is supported
wx.chooseLocation({
latitude: 0,
success:res=>{
console.info(res);
}
})
Other interfaces are being improved
more :
Wechat applet switch Style rewriting
Applet Image Component long press to identify supported codes
边栏推荐
- Code d'initialisation de l'arbre binaire
- Digital IC Design -- FIFO design
- Advanced stair climbing
- [deep learning] fast Reid tutorial
- Vant框架中关于IndexBar索引栏的CDN单页面引用,无法正常展示
- OneNote使用指南(一)
- 数字IC设计——FIFO的设计
- . Net compact Framework2.0 wince intelligent device development project experience sharing Net drag space advanced
- Linked list: delete the penultimate node of the linked list
- Mp4 playback
猜你喜欢
[data analysis and visualization] key points of data drawing 11- precautions for radar chart
[data and Analysis Visualization] data operation in D3 tutorial 3-d3
Detailed installation tutorial of MATLAB r2019 B-mode ultrasound (complete installation files are attached)
[data analysis and visualization] key points of data mapping 7- over mapping
Logiciel professionnel de gestion de base de données: Valentina Studio Pro pour Mac
Linked list: the first coincident node of two linked lists
Data processing in detailed machine learning (II) -- Feature Normalization
[data analysis and visualization] key points of data drawing 3- spaghetti map
Data warehouse notes | 5 factors that need attention for customer dimension modeling
For loop instead of while loop - for loop instead of while loop
随机推荐
小程序 input,textarea组件权重比fixed的z-index都高
Vant框架中关于IndexBar索引栏的CDN单页面引用,无法正常展示
[data analysis and visualization] key points of data drawing 3- spaghetti map
[thoughts in the essay] mourn for development technology expert Mao Xingyun
Matlab: obtain the figure edge contour and divide the figure n equally
[data and Analysis Visualization] D3 introductory tutorial 2- building shapes in D3
冲刺强基计划数学物理专题一
Ijkplayer source code - remuxing
Introduction to facial expression recognition system -- offline environment configuration
二叉樹初始化代碼
Ijkplayer source code -- Library loading and initialization
遍历数组,删除某元素,直到删除为止
Node uses post to request req Pit with empty body
2022 qianle micro cloud technology learning task plan
[data analysis and visualization] key points of data drawing 9- color selection
For loop instead of while loop - for loop instead of while loop
The latest Matlab r2020 B ultrasonic detailed installation tutorial (with complete installation files)
CV 06 demonstrates backgroundworker
Summary of the latest IOS interview questions in June 2020 (answers)
redis. Conf general configuration details