Applet confirm the choice of site address wx.chooseLocation map
/ ** * Life Cycle function - listen for page loads * / onLoad: function (Options) { console.log (Options); IF (options.jumpUrl) { wx.chooseLocation ({ Success: function (RES) { the let str = & options.jumpUrl} {$ `Latitude res.latitude = $ {$} = {& longitude res.longitude = $ {address} & res.address}` wx.redirectTo ({ URL: `../../webView/webView? Map & STR = = S $ {the encodeURIComponent (STR)} ` }) } }) } },
Frontiers: applet selection map, the above function is another page will come in Chuan url address, onLoad function
After selecting wx.chooseLocation have latitude and longitude, and address parameters webView returned to the page and the parameters of the corresponding on str.
First, the small micro-channel program location interface wx.chooseLocation
This simple interface, the user selects a position by the user Tencent map.
The present position of the interface can be selected to obtain short, full name, and the coordinate.
// Select Address wx.chooseLocation ({ Success: function (RES) { console.info (RES); }, })
Confusing interface wx.chooseAddress This interface is used to obtain a user's harvest address information.