地图SDK支持3D模型绘制,用于在地图上展示3D模型,目前支持obj+mtl文件格式模型加载。(注意:模型中的图片必须支持透明Alpha通道)
通过I3DModelOption来设置3D模型的属性。
示例代码如下:
const model = new Bd_3DModel({position: new LatLng(39.94923, 116.397428),modelPath: filePath,modelName: 'among_us',bm3DModelType: SysEnum.BM3DModelType.BM3DModelTypeObj,animationIsEnable: true,scale: 5});this.mapController?.addOverlay(model)
绘制效果如图:

其对应的配置参数如下:
const model = new Bd_3DModel({position: new LatLng(39.94923, 116.397428),modelPath: filePath,modelName: 'scenes',bm3DModelType: SysEnum.BM3DModelType.BM3DModelTypeglTF, //动画类型animationIsEnable: true,scale: 10});this.mapController?.addOverlay(model);
绘对应展示效果如下:
上一篇
下一篇
本篇文章对您是否有帮助?