[Mini Programs] WeChat Mini Programs Use Personalized Maps

See the development guide: operate according to 12345 points

Development Guide - Getting Started;
insert image description here

Create applications and keys;

Mini Program Location Services - My App

insert image description here
Select the style map, bind the created key, and the applet information will be displayed, just save it.
insert image description here
insert image description here
Once set up, it's ready to go!

key is Tencent map key.
The layer-style attribute is set to the style number (1, 2, 3) of the personalized style bound to the key, and it will take effect. As shown in the above figure, style 1 is the WeChat dark style, so assign the layer-style value to 1.

<map
  id="map"
  subkey="{
    
    {key}}"
  longitude="116.273514"
  latitude="40.040417"
  scale="14"
  layer-style="1"
></map>

Guess you like

Origin blog.csdn.net/LuviaWu/article/details/124383189