Uniapp uses Tencent Maps to create punctuation points and set up nanny tutorials

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
Insert image description here
. The picture below shows some points and specific operations that need to be paid attention to when creating a project with uniapp.
Insert image description here
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
Insert image description here
Insert image description here
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.
Insert image description here
Here we will explain some commonly used parameters and methods on the map.
Insert image description here
After we get the ID of the coordinate we clicked through the set markertap method, we can find the data information we want.
Insert image description here

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
Insert image description here

Guess you like

Origin blog.csdn.net/qq_53509791/article/details/132223295