WeChat Mini Program API Get Location
wx.getLocation(OBJECT)
Get the current geographical location and speed. When the user leaves the mini program, this interface cannot be called; when the user clicks "Show on top of chat", this interface can continue to be called.
OBJECT parameter description:
##success return parameter description:
Sample code:
wx.getLocation({ type: 'wgs84', success: function(res) { var latitude = res.latitude var longitude = res.longitude var speed = res.speed var accuracy = res.accuracy } })wx.chooseLocation(OBJECT)Open map selection Position
OBJECT parameter description:
##success return parameter description: