| this.center = this._center | this.center = this._center | ||||
| } | } | ||||
| /** | |||||
| * Sets Text with Style | |||||
| * @param text | |||||
| * @param textStyle | |||||
| * @returns {Circle} | |||||
| */ | |||||
| setLabel(text, textStyle) { | |||||
| this._delegate.position = Transform.transformWGS84ToCartesian(this._center) | |||||
| this._delegate.label = { | |||||
| ...textStyle, | |||||
| text: text | |||||
| } | |||||
| return this | |||||
| } | |||||
| /** | /** | ||||
| * | * | ||||
| * @param style | * @param style |
| * @returns {Rectangle} | * @returns {Rectangle} | ||||
| */ | */ | ||||
| setLabel(text, textStyle) { | setLabel(text, textStyle) { | ||||
| this._delegate.position = Cesium.Cartographic.toCartesian( | |||||
| Cesium.Rectangle.center( | |||||
| this._delegate.rectangle, | |||||
| new Cesium.Cartographic() | |||||
| ) | |||||
| ) | |||||
| this._delegate.label = { | |||||
| ...textStyle, | |||||
| text: text | |||||
| } | |||||
| return this | return this | ||||
| } | } | ||||