月球大数据地理空间分析展示平台-【前端】-月球2期前端
surprise
2023-10-19 bfe436e493006bea75d32383d6bdfc0af8c7e5d0
src/assets/js/Map/temporaryTools.js
@@ -37,7 +37,7 @@
            heightReference = Number.POSITIVE_INFINITY;
        }
        var style;
        if (res.style) {
        if (res.outline) {
            style = Cesium.LabelStyle.FILL_AND_OUTLINE
        } else {
            style = Cesium.LabelStyle.FILL
@@ -70,7 +70,7 @@
                    res.outlineColor
                ).withAlpha(res.outlineAlpha),
                outlineWidth: res.outlineWidth,
                outlineWidth: res.width,
                scale: res.scale,
                style: style,
                horizontalOrigin: Cesium.HorizontalOrigin.CENTER,//对齐方式
@@ -140,20 +140,23 @@
    addTemporaryPolylineLayer(res) {
        var outlinewidth = 0
        if (res.outline) {
            outlinewidth = res.outlineWidth
            outlinewidth = res.width
        }
        window.Viewer.entities.add({
            name: res.cnName,
            id: res.id,
            shpType: res.shpType,
            outline: res.outline,
            polyline: {
                outline: res.outline,
                positions: Cesium.Cartesian3.fromDegreesArray(res.geometry),
                width: res.width,
                distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
                    res.near,
                    res.far
                ),
                material: new Cesium.PolylineOutlineMaterialProperty({
                    color: Cesium.Color.fromCssColorString(res.material).withAlpha(
                        res.materialAlpha
@@ -336,7 +339,7 @@
            layerType: '线',
            geometry: geom,
            heightReference: res.polyline.clampToGround._value,
            outline: res.outline != null ? res.outline : false,
            outline:  res.outline != null ?  res.outline : false,
            width: res.polyline.width._value,
            material: this.colorRgbToHex('rgb(' + (mataColor.red * 255) + ',' + (mataColor.green * 255) + ',' + (mataColor.blue * 255) + ')'),
            outlineColor: this.colorRgbToHex('rgb(' + (outlineColor.red * 255) + ',' + (outlineColor.green * 255) + ',' + (outlineColor.blue * 255) + ')'),