浏览代码

fix: Cesium.Rectangle.center 参数错误

tags/3.2.0
shenweiqun 2 年前
父节点
当前提交
dcdf44d6dc
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2
    4
      src/modules/overlay/vector/Rect.js

+ 2
- 4
src/modules/overlay/vector/Rect.js 查看文件

* @returns {Rect} * @returns {Rect}
*/ */
setLabel(text, textStyle) { setLabel(text, textStyle) {
const rectangle = this._delegate.rectangle.coordinates.getValue()
this._delegate.position = Cesium.Cartographic.toCartesian( this._delegate.position = Cesium.Cartographic.toCartesian(
Cesium.Rectangle.center(
this._delegate.rectangle,
new Cesium.Cartographic()
)
Cesium.Rectangle.center(rectangle, new Cesium.Cartographic())
) )
this._delegate.label = { this._delegate.label = {
...textStyle, ...textStyle,

正在加载...
取消
保存