map 地图 标记图案不显示
发布于 6 年前 作者 nafu 14780 次浏览 来自 问答

从官方文档复制粘贴过去的,改了下坐标,markers里面加了个图标,就是找不到那个图标在哪里

Page({

  data: {

    markers: [{

      title:“我在这里”,

      latitude: 113.061348,

      longitude: 23.637418,

      iconPath: ‘/images/my.png’

    }],

    polyline: [{

      points: [{

        latitude: 113.049915,

        longitude: 23.630289,

      }, {

          latitude: 113.049915,

          longitude: 23.630289,

      }],

      color: “#FF0000DD”,

      width: 2,

      dottedLine: true

    }],

    controls: [{

      id: 1,

      position: {

        left: 0,

        top: 300 - 50,

        width: 50,

        height: 50

      },

      clickable: true

    }]

  },

  regionchange(e) {

    console.log(e.type)

  },

  markertap(e) {

    console.log(e.markerId)

  },

  controltap(e) {

    console.log(e.controlId)

  }

})

回到顶部