Use the Uniapp built-in map
First we need to create a uniapp project
We click on the file in the upper left corner of HBuilder to create a new project
. The picture below shows some points and specific operations that need to be paid attention to when creating a project with uniapp.
After we create the project, we enter the project pages folder and create a new one. Vue page or you can directly use the Vue page inside, and then we need to open the Uniapp official website link: https://uniapp.dcloud.net.cn/component/map.html#Use the map component among the built-in components
here. It involves the creation of a punctuation point. Then when creating a punctuation point, we can locate the coordinate point by setting the coordinate points of latitude and longitude. Here we note that when we add multiple coordinate points, we need to Add the ID field to the dictionary.
Here we will explain some commonly used parameters and methods on the map.
After we get the ID of the coordinate we clicked through the set markertap method, we can find the data information we want.
The last thing we need is that when using the built-in map, there may be an effect that cannot be displayed, so at this time we set the version of our WeChat applet to version 2.11.2