| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-11-09 15:41:35 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-12-17 19:00:23 |
| | | * @LastEditTime: 2024-12-18 09:39:00 |
| | | * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue |
| | | * @Description: |
| | | * |
| | |
| | | } |
| | | |
| | | const createLinePath = (item, cb = () => { }) => { |
| | | let polyline = new DC.Polyline(item.linePosition) |
| | | polyline.setStyle({ |
| | | width: 20, |
| | | material: new DC.PolylineImageTrailMaterialProperty({ |
| | | color: DC.Color.RED, |
| | | speed: 20, |
| | | image: VITE_APP_BASE + 'img/mapicon/right.png', |
| | | repeat: { x: 5, y: 1 } |
| | | }), |
| | | clampToGround: false |
| | | }) |
| | | if (item.linePosition) { |
| | | let polyline = new DC.Polyline(item.linePosition) |
| | | polyline.setStyle({ |
| | | width: 20, |
| | | material: new DC.PolylineImageTrailMaterialProperty({ |
| | | color: DC.Color.RED, |
| | | speed: 20, |
| | | image: VITE_APP_BASE + 'img/mapicon/right.png', |
| | | repeat: { x: 5, y: 1 } |
| | | }), |
| | | clampToGround: false |
| | | }) |
| | | |
| | | dynamicLineVectorLayer.addOverlay(polyline) |
| | | dynamicLineVectorLayer.addOverlay(polyline) |
| | | } else { |
| | | let threeCenter = DC.Position.fromObject(item.threePointPosition) |
| | | let threeCircle = new DC.Circle(threeCenter, 30) |
| | | threeCircle.setStyle({ |
| | | material: new DC.CircleWaveMaterialProperty({ |
| | | color: DC.Color.fromRandom(), |
| | | speed: 20, |
| | | count: 5, |
| | | gradient: 0.5 |
| | | }) |
| | | }) |
| | | dynamicVectorLayer.addOverlay(threeCircle) |
| | | } |
| | | |
| | | let threeContent = new DC.DivIcon( |
| | | new DC.Position(item.threePointPosition.lng, item.threePointPosition.lat, 70), |
| | |
| | | }) |
| | | } else { |
| | | twoFun(item, () => { |
| | | publicFun(item) |
| | | createLinePath(item, () => { |
| | | publicFun(item) |
| | | }) |
| | | }) |
| | | } |
| | | }) |