Просмотр исходного кода

improve math center

tags/3.0.1
Caven Chen 2 лет назад
Родитель
Сommit
a63509471a
1 измененных файлов: 2 добавлений и 1 удалений
  1. 2
    1
      src/modules/math/center.js

+ 2
- 1
src/modules/math/center.js Просмотреть файл

@@ -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(

Загрузка…
Отмена
Сохранить