| | |
| | | // 选取两个断面点坐标并绘制断面截面 |
| | | function addPointToViewer(point) { |
| | | if (pickedPointsCross.value.length >= 2) { |
| | | clearPoints(); |
| | | for (const id of pickedEntitiesIds.value) { |
| | | viewer.entities.remove(viewer.entities.getById(id)); |
| | | } |
| | | pickedPointsCross.value = []; |
| | | pickedEntitiesIds.value = []; |
| | | isWallCreated.value = false; |
| | | isUploaded.value = false; |
| | | } |
| | | pickedPointsCross.value.push(point); |
| | | drawPointOnMap(point); |
| | |
| | | ); |
| | | |
| | | const cylinderBottomHeight = 0; |
| | | const cylinderTopHeight = terrainHeight + 190; |
| | | const cylinderTopHeight = terrainHeight + 100; |
| | | const cartesianBottom = viewer.scene.globe.ellipsoid.cartographicToCartesian( |
| | | Cesium.Cartographic.fromDegrees(midLon, midLat, cylinderBottomHeight) |
| | | ); |
| | | const CrosscylinderEntity = viewer.entities.add({ |
| | | position: cartesianBottom, |
| | | cylinder: { |
| | | length: 190.0, |
| | | length: 100.0, |
| | | topRadius: 1.0, |
| | | bottomRadius: 1.0, |
| | | material: Cesium.Color.YELLOW, |
| | |
| | | pickedEntitiesIds.value = []; |
| | | isWallCreated.value = false; |
| | | isUploaded.value = false; |
| | | if (pickHandlerCross) { |
| | | pickHandlerCross.destroy(); |
| | | pickHandlerCross = null; |
| | | } |
| | | isPicking.value = false; |
| | | } |
| | | function initPickHandler() { |
| | | if (isPicking.value) { |