The WeChat applet provides an embedded map and calls the navigation function of the map app in the mobile phone. The code is as follows:
js:
marker tap (s) { var latitude = e.currentTarget.dataset.latitude var longitude = e.currentTarget.dataset.longitude console.log("latitude:", latitude) console.log("longitude:", longitude) wx.openLocation({ latitude: Number(latitude), longitude: Number(longitude), }) }However, when it is written into onload, it is invalid.
If you have any questions, please join the group: 563752274 , the pure applet development exchange group, answer the question answer: Tony .