按照官网交通仿真示例,在原生html可以加载出汽车模型,但是在vue框架中模型加载不出来,import进来的时候就报错了
您好,放在static目录下了也没有显示出汽车
var urls = [ //加载模型信息 '../../../static/cars/qiche2.s3m', 'static/cars/qiche3.s3m', 'static/cars/qiche4.s3m', 'static/cars/qiche5.s3m', 'static/cars/qiche6.s3m', 'static/cars/qiche7.s3m', 'static/cars/qiche8.s3m', 'static/cars/qiche9.s3m', 'static/cars/qiche10.s3m', 'static/cars/qiche11.s3m', 'static/cars/qiche12.s3m', 'static/cars/qiche13.s3m', 'static/cars/qiche14.s3m', 'static/cars/qiche15.s3m', 'static/cars/qiche16.s3m', 'static/cars/qiche17.s3m', 'static/cars/qiche18.s3m' ]; var car_layer = new Cesium.DynamicLayer3D(viewer.scene.context, urls);
控制台打印出汽车图层:
您好,我这边测试能正常添加您那边再检查一下代码