更新时间:2026/02/27 14:50
提供Prism类,实现棱柱的绘制。可以通过API设置底面坐标、高度、侧面颜色、顶面颜色、侧面纹理。

代码
let prism = new Prism({ points: [new LatLng(30, 110), new LatLng(30, 110.02), new LatLng(29.985, 110.02), new LatLng(29.985, 110)], height: 600, topFaceColor: 'rgba(17, 29, 234,0.6)', sideFaceColor: 'rgba(17, 29, 234,1)',})this.mapController.addOverlay(prism);
let prism2 = new Prism({ points: [new LatLng(30+0.05, 110), new LatLng(30+0.05, 110.02), new LatLng(29.985+0.05, 110)], height: 500, topFaceColor: 'rgba(255, 0, 0, 0.5)', sideFaceColor: 'rgba(255, 0, 0, 0.7)',})
this.mapController.addOverlay(prism2);本篇文章对您是否有帮助?