| | |
| | | mouseHandlerDraw = null; |
| | | } |
| | | TooltipDiv.setVisible(false); |
| | | //移除 |
| | | //移除 |
| | | 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), |
| | | } |
| | |
| | | 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) { |
| | |
| | | // var intersects = turf.lineIntersect(line1, line2); |
| | | // if (intersects && intersects.features && intersects.features.length > 0) { |
| | | // isIntersect = true; |
| | | |
| | | |
| | | // alert('图形自相交!'); |
| | | // break; |
| | | // } |
| | |
| | | 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), |
| | | } |
| | |
| | | mouseHandlerDraw = null; |
| | | } |
| | | TooltipDiv.setVisible(false); |
| | | //移除 |
| | | //移除 |
| | | if (drawingPolylineN != undefined) |
| | | viewer.entities.remove(drawingPolylineN); |
| | | if (drawingPolylineT != undefined) |
| | |
| | | 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), |
| | | } |
| | |
| | | var lineOptsN = { |
| | | polyline: { |
| | | positions: positionN, |
| | | clampToGround: true, // |
| | | clampToGround: true, // |
| | | width: 3, |
| | | material: Cesium.Color.RED.withAlpha(0.5), |
| | | } |
| | |
| | | |
| | | } |
| | | return _; |
| | | })(); |
| | | })(); |