首页 / 浏览问题 / WebGIS / 问题详情
supermap动画渲染线的轨迹
21EXP 2021年02月24日

线条呈动画效果画出

我用了new SuperMap.Layer.AnimatorVector("animatorVector",{rendererType:"StretchLine"},speed:1,startTime:10,endTime:100});

animatorVector.addFeatures([
   new SuperMap.Feature.Vector(
    new SuperMap.Geometry.LineString([
        new SuperMap.Geometry.Point(0,0),
        new SuperMap.Geometry.Point(2500000,0)
    ]),
    { //attribute
        FEATUREID: 0,
        TIME:10
    },
    {//style
        strokeColor: "blue"
    }),
new SuperMap.Feature.Vector(
    new SuperMap.Geometry.LineString([
        new SuperMap.Geometry.Point(0,0),
        new SuperMap.Geometry.Point(2500000,0),
        new SuperMap.Geometry.Point(5000000,0)
    ]),
    { //attribute
        FEATUREID: 0,
        TIME:100
    },
    {//style
        strokeColor: "red"
    })
]);
map.addLayer(animatorVector);

只出来了第一条线,而且无动画效果。求助。。。。 求代码。。。

1个回答

您好,下面连接里有一个动画效果画线的文件,您运行参考一下

链接:https://pan.baidu.com/s/1UpL-X9JagHJ4ePTf3yXRuA
提取码:bgca
1,504EXP 2021年02月25日
有没有线的伸缩动画,线的运动,就是两点之间线的连接动画,线从第一个点开始,慢慢变长去连接第二个点、第三个点. . . . . .
...