Description
maptalks's version and what browser you use?
直线的无线滚动动画在高分辨率的屏幕上会使整个页面卡死
Issue description
let start = [item1.pointList[0].lngWgs, item1.pointList[0].latWgs];
let end = [item1.pointList[1].lngWgs, item1.pointList[1].latWgs];
const line = new maptalks.LineString([start, end], {
symbol: {
linePatternFile,
linePatternDx: 0,
lineWidth: 15,
// linePatternAnimSpeed: 0.25,
},
}).addTo(this.layer);
this.markerArrary[${index}${index1}
] = line;
this.largePointJsonList[${index}${index1}
] = line;
function animateLine() {
line.animate(
{
symbol: {
// 20 is the width of pattern.png to ensure seamless animation
linePatternDx: 30,
lineWidth: 15,
linePatternAnimSpeed: 0.25,
},
},
{
// 'duration': 3000, // 动画持续时间,单位毫秒
easing: "linear", // 缓动函数,这里使用线性动画
repeat: true, // 是否循环播放
}
);
}
line.on("animateend", function () {
// 动画结束后立即启动下一次动画
animateLine();
});
animateLine();
});