maptalks 开发GIS地图(15)maptalks.three.08

1. box 从代码上来说,和 bar 的代码类似,只不过是 threelayer.toBar 改为了

  threelayer.toBox 。在样式的区别来看,也是 Bar 的六边形变成了 Box 的

 四边形。

2.  代码参考

Box:

1  var bar = threeLayer.toBox(d.coordinate, {
2                         height: d.height * 200,
3                         radius: 15000,
4                         topColor: '#fff',
5                         // radialSegments: 4
6                     }, material);

Bar:

1    var bar = threeLayer.toBar(d.coordinate, {
2                         height: d.height * 400,
3                         radius: 15000,
4                         topColor: '#fff',
5                         // radialSegments: 4
6                     }, material);

3. 页面效果

Bar:

  

 Box:

4. 源码参考

https://github.com/WhatGIS/maptalkMap/tree/main/threelayer/demo

原文地址:https://www.cnblogs.com/googlegis/p/14733737.html