组件map中controls的iconPath怎么设置相对或者绝对路径都不能显示

发布于 7 年前作者 daina5367 次浏览最后编辑 7 年前来自 ask

controls: [{

      id: 1,

      iconPath: ‘/img/ios.png’,

     position: {

        left: 0,

        top: 300 - 50,

        width: 50,

        height: 50

      },

      clickable: true

    }]

组件map中controlsiconPath怎么设置相对或者绝对路径都不能显示,如何解决这个问题呢?

1 回复
tanqiang
tanqiang1 楼5 年前

你好,你可以试试将路径设置为:…/img/ios.png