当前位置:网站首页>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
边栏推荐
- js 解构赋值
- Matlab: obtain the figure edge contour and divide the figure n equally
- Opencv 10 brightness contrast adjustment
- Summary of innovative ideas of transformer model in CV
- [data analysis and visualization] key points of data drawing 4- problems of pie chart
- Example 4 linear filtering and built-in filtering
- Model prediction of semantic segmentation
- Svg filter effect use
- Graduation project - campus old thing recycling system based on stm32
- 二叉樹初始化代碼
猜你喜欢
![[data and Analysis Visualization] D3 introductory tutorial 2- building shapes in D3](/img/b8/06779a82e79e44534573fa60460b31.jpg)
[data and Analysis Visualization] D3 introductory tutorial 2- building shapes in D3

Vscode liveserver use_ Liveserver startup debugging
![[data and Analysis Visualization] D3 introductory tutorial 1-d3 basic knowledge](/img/a8/468a0c4d4a009e155679898fac4b81.jpg)
[data and Analysis Visualization] D3 introductory tutorial 1-d3 basic knowledge

Pycharm installation pyqt5 and its tools (QT designer, pyuic, pyrcc) detailed tutorial
![HEAP[xxx.exe]: Invalid address specified to RtlValidateHeap( 0xxxxxx, 0x000xx)](/img/c9/884aa008a185a471dfe252c0756fc1.png)
HEAP[xxx.exe]: Invalid address specified to RtlValidateHeap( 0xxxxxx, 0x000xx)

Linked list: the first coincident node of two linked lists

Operating principle of JS core EventLoop

Prometheus node_ Exporter installs and registers as a service

OpenCVSharpSample04WinForms

Spark UDF instance details
随机推荐
How to manage the IT R & D department?
Prometheus install and register services
Introduction to facial expression recognition system -- offline environment configuration
Hash table: valid anagrams
Surpass the strongest variant of RESNET! Google proposes a new convolution + attention network: coatnet, with an accuracy of 89.77%!
PK of dotnet architecture
Keil去掉烦人的ST-Link更新提示
IOS development interview knowledge sorting - OC Foundation (II)
Matlab: find the inner angle of n-sided concave polygon
【 enregistrement pytorch】 paramètre et tampon des variables pytorch. Self. Register Buffer (), self. Register Paramètre ()
Welcome to blog navigation
Opencv 17 face recognition
[data analysis and visualization] key points of data drawing 3- spaghetti map
FFmpeg原理
Linked list: the first coincident node of two linked lists
Spark UDF instance details
OpenCVSharpSample04WinForms
Word splitting problem
Ijkplayer source code - rendering
Beginner development process_ Project development FAQs