小程序-地图-标注点固定在某一点

需求:1.指定地点为“成都工业学院”  

wxml:

<map id="mymap" show-location longitude="103.892736" latitude="30.793032" scale="14" markers="{{markers}}">

 js:

Page({

    data:{

          markers:[{

                  id: "0",      //标记点id

                  iconPath: "../images/mapicon.png",    //标记点图标

                  longitude: 103.892736,    //中心经度

                  latitude: 30.793032,         //中心纬度

                  30,              //标记点图标宽

                  height:30             //标记点图标高

           }]

    }

})

原文地址:https://www.cnblogs.com/liuqingxia/p/7699427.html