shuishen
2023-05-18 0cb4183bfff1e8b7d956fad77333c2bde18aea4f
动态轨迹线调整
2 files modified
12 ■■■■ changed files
public/images/arrows.png patch | view | raw | blame | history
src/components/map/index.vue 12 ●●●● patch | view | raw | blame | history
public/images/arrows.png

src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-05-16 20:44:11
 * @LastEditTime: 2023-05-18 15:43:37
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -1081,16 +1081,22 @@
                return !item.some(it => it == 0)
            })
            console.log(params.width, 15)
            polygonObj[polygonName].setStyle({
                width: (params.width / 2),
                width: params.width,
                material: new global.DC.PolylineImageTrailMaterialProperty({
                    color: new global.DC.Color(255, 255, 255),
                    speed: 20,
                    image: '/images/arrows.png',
                    repeat: {
                        x: (getLineSpeed(positionData) / 2), y: 1
                        x: getLineSpeed(positionData) / 2, y: 1
                    }
                }),
                distanceDisplayCondition: {
                    near: 0, //最近距离
                    far: 2000 //最远距离
                },
                clampToGround: false,
                ...setStyle
            })