赣州市洪水风险预警系统三维版本
guoshilong
2023-02-01 c2c9f6faf819d7e284227d61962ba623a22865ec
widgets/ThematicDynamicRiver/ThematicDynamicRiver.js
@@ -82,7 +82,7 @@
                            mouseHandlerDraw = null;
                        }
                        TooltipDiv.setVisible(false);
                        //移除
                        //移除
                        if (drawingPolyline != undefined)
                            viewer.entities.remove(drawingPolyline);
@@ -106,7 +106,7 @@
                    var lineOpts = {
                        polyline: {
                            positions: positionArr,
                            clampToGround: true,  //
                            clampToGround: true,  //
                            width: 3,
                            material: Cesium.Color.BLUE.withAlpha(0.5),
                        }
@@ -138,7 +138,7 @@
                if (cartesian) {
                    positions.push(cartesian.clone());
                //    var cartographic = Cesium.Cartographic.fromCartesian(cartesian);//当前点
                //    if (cartographic) {
                //    if (cartographic) {
                //        if (cartesian) {
                //            var isIntersect = false;
                //            if (positions.length >= 3) {
@@ -154,7 +154,7 @@
                //                    var intersects = turf.lineIntersect(line1, line2);
                //                    if (intersects && intersects.features && intersects.features.length > 0) {
                //                        isIntersect = true;
                //                        alert('图形自相交!');
                //                        break;
                //                    }
@@ -180,13 +180,12 @@
                        positionArr.push(positions[i]);
                    }
                    positionArr.push(cartesian);
                    if (drawingPolyline != undefined)
                        viewer.entities.remove(drawingPolyline);
                    var lineOpts = {
                        polyline: {
                            positions: positionArr,
                            clampToGround: true,  //
                            clampToGround: true,  //
                            width: 3,
                            material: Cesium.Color.BLUE.withAlpha(0.5),
                        }
@@ -254,7 +253,7 @@
                            mouseHandlerDraw = null;
                        }
                        TooltipDiv.setVisible(false);
                        //移除
                        //移除
                        if (drawingPolylineN != undefined)
                            viewer.entities.remove(drawingPolylineN);
                        if (drawingPolylineT != undefined)
@@ -274,13 +273,13 @@
                    var positionArr = [];
                    positionArr.push(positions[0]);
                    positionArr.push(cartesian);
                    //实时
                    //实时
                    if (drawingPolylineT != undefined)
                        viewer.entities.remove(drawingPolylineT);
                    var lineOptsT = {
                        polyline: {
                            positions: positionArr,
                            clampToGround: true,  //
                            clampToGround: true,  //
                            width: 3,
                            material: Cesium.Color.BLUE.withAlpha(0.5),
                        }
@@ -295,7 +294,7 @@
                    var lineOptsN = {
                        polyline: {
                            positions: positionN,
                            clampToGround: true,  //
                            clampToGround: true,  //
                            width: 3,
                            material: Cesium.Color.RED.withAlpha(0.5),
                        }
@@ -308,4 +307,4 @@
    }
    return _;
})();
})();