Browse Source

improve math center

tags/3.0.1
Caven Chen 2 years ago
parent
commit
a63509471a
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/modules/math/center.js

+ 2
- 1
src/modules/math/center.js View File

@@ -6,9 +6,10 @@ import { Cesium } from '../../namespace'
import { Transform } from '../transform'
import Position from '../position/Position'


export default function center(positions) {
if (positions && Array.isArray(positions)) {
let heightMax = 0 // 位置最高的点的高度
let heightMax = 0
positions.forEach(({ alt }) => (heightMax = Math.max(heightMax, alt)))

let boundingSphere = Cesium.BoundingSphere.fromPoints(

Loading…
Cancel
Save