shuishen
2023-05-08 e24f70ababdee2b4fdce71c6b80a9bc928fa0331
src/utils/tools/DrawTool.js
@@ -19,7 +19,7 @@
class DrawTool {
    constructor() {
        this._viewer = undefined
        this._anchorLayer = new global.DC.Namespace.Cesium.CustomDataSource('draw-anchor-layer')
        this._anchorLayer = new global.DC.Namespace.Cesium.CustomDataSource('tool-three-draw-anchor-layer')
        this._floatingAnchor = undefined
        this._options = {}
        this._plotEvent = new PlotEvent()
@@ -88,14 +88,14 @@
     * @private
     */
    _onCreateAnchor ({ position, isCenter = false }) {
        console.log(this._options, 6633333)
        return this._anchorLayer.entities.add({
            position: position,
            billboard: {
                show: true,
                image: isCenter ? this._options.icon_center : this._options.icon_anchor,
                width: this._options.icon_size[0],
                height: this._options.icon_size[1],
                eyeOffset: new global.DC.Namespace.Cesium.Cartesian3(0, 0, -4),
                eyeOffset: new global.DC.Namespace.Cesium.Cartesian3(0, 0, 0),
                heightReference:
                    this._viewer.scene.mode === global.DC.Namespace.Cesium.SceneMode.SCENE3D &&
                        !this._options.clampToModel