The map application building platform (also called Wemap Builder) is a low-code development platform for maps. It provides a wealth of small program templates in the WeChat developer tools. Developers can choose templates to quickly create map applications. At the same time, they can directly Use a low-code editor to develop applets more efficiently.
This article will take you to quickly understand how WeMap Builder can help developers quickly build map applications.
1. Advantages of using WeMap Builder in WeChat developer tools
1. Deep integration of WeChat developer tools
WeMap Builder provides application templates such as location display, event registration, route planning, and scenic spot details in the WeChat developer tools. After the developer selects the template in the WeChat developer tools, he can quickly create a small program application. In the low-code editor You can develop applets by dragging and dropping components, saving, and uploading codes.
2. Rich map components
As a map low-code platform, we provide a wealth of map components, including basic maps, positioning, route planning, location search and other components, which can satisfy users' use of map application scenarios.
2. Use WeMap Builder to create applications in WeChat developer tools
1. Select a template in the WeChat developer tools
Open the WeChat developer tool to create a small program, fill in and select the AppId, select not to use cloud services for the back-end service, select the map application construction platform in the template selection, and you can see the application template of WeMap Builder, and select the location display template.
2. Edit applet application
Click OK to enter the application editing page. On the left is the applet simulator to see the application effect, and on the right is the application editor where you can drag and drop components to modify the application.
3. Save and upload the Mini Program application
After editing the application, you can click the save button. After saving successfully, you can click the upload button to upload the code.
After the upload is successful, the Mini Program can be reviewed and published on the Mini Program WeChat public platform.
3. WeMap Builder map component
1. Provide rich map layer effects
It is also very convenient to use the map component. As shown in the figure below, drag a map component, and you can configure basic properties such as the latitude and longitude of the center point of the map, zoom level, display scale, and zoom range in the component configuration panel on the right.
For the map component, you can create a new layer in the configuration panel on the right, as shown in the figure below, if you create a new point layer, a marker will be drawn on the map.
2. Implementation of the map component
The map component architecture diagram is as follows
basic attributes
The map component supports common properties, and users can easily configure properties in WeMap Builder and see the configuration effect in real time.
2) Attribute management
Here the map component initializes the map according to the attributes configured by the user, and uses the publish-subscribe mode to monitor the modification of the attribute value. When the attribute value is modified, the map can be changed accordingly.
3) Layers
The map component supports rich layers, and users can create and superimpose multiple layers according to business scenarios.
4) Layer management
Here, according to the initialization method provided by the layer, the layer configured by the user is initialized, and at the same time, the change of the layer property is monitored, so that the effect of the property change layer can be changed in real time.