vue 引入图片时报错

在用cesuim绘制 billboard (图片)时报错

viewer.entities.add({
              id : deviceData[i].dev,
              name : deviceData[i].dev_name,
              position : Cesium.Cartesian3.fromDegrees(Number(deviceData[i].gps_lon), Number(deviceData[i].gps_lat)),
              billboard : {
                image :'../assets/img0/normal-green.png',
                scale : 0.7,
              },
              billboardName : deviceData[i].dev
            })

因为没有引入图片

import normal_green  from '../assets/img0/normal-green.png'



viewer.entities.add({
              id : deviceData[i].dev,
              name : deviceData[i].dev_name,
              position : Cesium.Cartesian3.fromDegrees(Number(deviceData[i].gps_lon), Number(deviceData[i].gps_lat)),
              billboard : {
                image :normal_green,
                scale : 0.7,
              },
              billboardName : deviceData[i].dev
            })

 

你可能感兴趣的:(vue)