clone一份数据,PolygonHierarchy会修改this._positions原始数据,导致_stopdHook转换之后的高度异常tags/3.0.0
| _mountedHook() { | _mountedHook() { | ||||
| this._delegate.polygon.hierarchy = new Cesium.CallbackProperty(time => { | this._delegate.polygon.hierarchy = new Cesium.CallbackProperty(time => { | ||||
| if (this._positions.length > 2) { | if (this._positions.length > 2) { | ||||
| return new Cesium.PolygonHierarchy(this._positions) | |||||
| return new Cesium.PolygonHierarchy( | |||||
| this._positions.map(item => item.clone()) | |||||
| ) | |||||
| } else { | } else { | ||||
| return null | return null | ||||
| } | } |