Browse Source

Merge pull request #162 from ShenWeiQun/master

fix: Cesium.Rectangle.center 参数错误
tags/3.2.0
Caven Chen 2 years ago
parent
commit
e1046b43b4
No account linked to committer's email address
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      src/modules/overlay/vector/Rect.js

+ 2
- 4
src/modules/overlay/vector/Rect.js View File

@@ -45,11 +45,9 @@ class Rect extends Overlay {
* @returns {Rect}
*/
setLabel(text, textStyle) {
const rectangle = this._delegate.rectangle.coordinates.getValue()
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 = {
...textStyle,

Loading…
Cancel
Save