We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
看报错信息是因为this._delegate.polygon.hierarchy,对于Circle没有polygon这个属性 尝试将EditCircle.js中_mountedHook函数修改如下可以解决问题: _mountedHook() { this._radius = this._overlay.radius this._center = Transform.transformWGS84ToCartesian(this._overlay.center) this._positions = [].concat([ this._center, this._computeCirclePoints(this._center, this._radius)[0] ]) this._delegate.position = new Cesium.CallbackProperty(() => { return this._positions[0] }) this._delegate.ellipse.semiMajorAxis = this._delegate.ellipse.semiMinorAxis = new Cesium.CallbackProperty(() => { if (this._positions.length > 1) { this._radius = Cesium.Cartesian3.distance( this._positions[0], this._positions[1] ) if (this._radius <= 0) { return null } return this._radius } else { return null } }) this._layer.entities.add(this._delegate) }
The text was updated successfully, but these errors were encountered:
improve the circle #104
082d409
已修复 ,下个版本发布
Sorry, something went wrong.
No branches or pull requests
看报错信息是因为this._delegate.polygon.hierarchy,对于Circle没有polygon这个属性
尝试将EditCircle.js中_mountedHook函数修改如下可以解决问题:
_mountedHook() {
this._radius = this._overlay.radius
this._center = Transform.transformWGS84ToCartesian(this._overlay.center)
this._positions = [].concat([
this._center,
this._computeCirclePoints(this._center, this._radius)[0]
])
this._delegate.position = new Cesium.CallbackProperty(() => {
return this._positions[0]
})
this._delegate.ellipse.semiMajorAxis = this._delegate.ellipse.semiMinorAxis = new Cesium.CallbackProperty(() => {
if (this._positions.length > 1) {
this._radius = Cesium.Cartesian3.distance(
this._positions[0],
this._positions[1]
)
if (this._radius <= 0) {
return null
}
return this._radius
} else {
return null
}
})
this._layer.entities.add(this._delegate)
}
The text was updated successfully, but these errors were encountered: