收藏
回答

map组件下marks的iconPath不支持网络图片?!!

    markers: [{
      iconPath: "/resources/others.png",
      id: 0,
      latitude: 23.099994,
      longitude: 113.324520,
      width: 50,
      height: 50
    }],

当iconPath:"https://www.hearthome520.com/up/ico.png"不起作用!

回答关注问题邀请回答
收藏

4 个回答

  • 猫猫
    猫猫
    2018-03-13

    开发者工具上无效吗?我转化后还是默认图片

    2018-03-13
    有用
    回复
  • 2017-11-14

    全下载下来啊

    for (var i = 0; i < gm.length; i++) {
        (function (i) {
            wx.downloadFile({
            url: app.data.server + 'avatar/' + gm[i].openId + '.png',
            success: function (res) {
                if (res.statusCode === 200) {
                    buf[i].iconPath = res.tempFilePath
                }
                buf[i].latitude = gm[i].latitude
                buf[i].longitude = gm[i].longitude
                markers.push(buf[i])
                page.oneDownloadFinish()
                }
            })
        })(i)
    }


    2017-11-14
    有用
    回复
  • Lucien
    Lucien
    2017-11-13

    你怎么处理批量MARKS里面的图标的?

    2017-11-13
    有用
    回复
  • 2017-11-11

    我也刚遇到,得用wx.downloadFile下载到微信缓存,然后引用缓存路径

    2017-11-11
    有用
    回复
登录 后发表内容