| * @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, |