echarts icon indicating copy to clipboard operation
echarts copied to clipboard

echarts与百度离线地图整合路线分步展示效果存在渲染bug。

Open ZhuGYao opened this issue 8 years ago • 6 comments

One-line summary [问题简述]

  在echarts与百度地图整合中,加入时间轴,然后对路线轨迹进行分步展示,timeline的playInterval设置为3秒,路线展示中每一段路程的展示时间period为3秒,在一开始运行过程中,不点击下方时间轴的情况下,展示效果良好无差错。**但在某一时间点还未运行完成,然后点击时间轴进行回放,运行轨迹就会出现问题,出现跳跃残影问题,并且此问题一直存在无法恢复正常**。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.8.5
  • Browser version [浏览器类型和版本]:谷歌最新版
  • OS Version [操作系统类型和版本]:win10

Expected behaviour [期望结果]

期望在某一时间点还未运行完成,然后点击时间轴进行回放,不会出现跳跃残影问题,并且会一直正常显示。下方有完整源码,希望可以将此bug解决。

ECharts option [ECharts配置项]

{
    "baseOption": {
        "bmap": {
            "center": [
                112.08,
                32.68
            ],
            "zoom": 14,
            "roam": true
        },
        "timeline": {
            "axisType": "category",
            "autoPlay": true,
            "playInterval": 3000,
            "data": [
                1,
                2,
                3,
                4,
                5
            ]
        },
        "color": "gold",
        "backgroundColor": "#404a59",
        "tooltip": {
            "trigger": "item"
        },
        "geo": {
            "map": "bmap",
            "polyline": true,
            "progressiveThreshold": 500,
            "progressive": 200,
            "label": {
                "emphasis": {
                    "show": false
                }
            },
            "roam": true,
            "itemStyle": {
                "normal": {
                    "areaColor": "#323c48",
                    "borderColor": "#404a59"
                },
                "emphasis": {
                    "areaColor": "#2a333d"
                }
            }
        },
        "series": [
            {
                "type": "lines",
                "coordinateSystem": "bmap"
            },
            {
                "type": "lines",
                "coordinateSystem": "bmap"
            },
            {
                "type": "effectScatter",
                "coordinateSystem": "bmap",
                "zlevel": 2,
                "rippleEffect": {
                    "brushType": "stroke"
                },
                "label": {
                    "normal": {
                        "show": true,
                        "position": "right",
                        "formatter": "{b}"
                    }
                },
                "symbolSize": 25,
                "showEffectOn": "render",
                "itemStyle": {
                    "normal": {
                        "color": "red"
                    }
                },
                "data": [
                    {
                        "name": "壤城路北环路",
                        "value": [
                            112.09988,
                            32.70335
                        ]
                    },
                    {
                        "name": "三贤路与北环路交叉",
                        "value": [
                            112.0874,
                            32.6954
                        ]
                    },
                    {
                        "name": "邓南路湍河桥",
                        "value": [
                            112.1269,
                            32.6976
                        ]
                    },
                    {
                        "name": "刁河大桥",
                        "value": [
                            112.0409,
                            32.6434
                        ]
                    }
                ]
            }
        ]
    },
    "options": [
        {
            "series": [
                {
                    "zlevel": 1,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0.7,
                        "color": "red",
                        "symbolSize": 3
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "壤城路北环路",
                            "toName": "三贤路与北环路交叉",
                            "coords": [
                                [
                                    112.09988,
                                    32.70335
                                ],
                                [
                                    112.0874,
                                    32.6954
                                ]
                            ]
                        }
                    ]
                },
                {
                    "zlevel": 2,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0,
                        "symbol": "path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z",
                        "symbolSize": 15
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "opacity": 0.4,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "壤城路北环路",
                            "toName": "三贤路与北环路交叉",
                            "coords": [
                                [
                                    112.09988,
                                    32.70335
                                ],
                                [
                                    112.0874,
                                    32.6954
                                ]
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "series": [
                {
                    "zlevel": 1,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0.7,
                        "color": "red",
                        "symbolSize": 3
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "三贤路与北环路交叉",
                            "toName": "邓南路湍河桥",
                            "coords": [
                                [
                                    112.0874,
                                    32.6954
                                ],
                                [
                                    112.1269,
                                    32.6976
                                ]
                            ]
                        }
                    ]
                },
                {
                    "zlevel": 2,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0,
                        "symbol": "path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z",
                        "symbolSize": 15
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "opacity": 0.4,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "三贤路与北环路交叉",
                            "toName": "邓南路湍河桥",
                            "coords": [
                                [
                                    112.0874,
                                    32.6954
                                ],
                                [
                                    112.1269,
                                    32.6976
                                ]
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "series": [
                {
                    "zlevel": 1,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0.7,
                        "color": "red",
                        "symbolSize": 3
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "邓南路湍河桥",
                            "toName": "三贤路与北环路交叉",
                            "coords": [
                                [
                                    112.1269,
                                    32.6976
                                ],
                                [
                                    112.0874,
                                    32.6954
                                ]
                            ]
                        }
                    ]
                },
                {
                    "zlevel": 2,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0,
                        "symbol": "path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z",
                        "symbolSize": 15
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "opacity": 0.4,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "邓南路湍河桥",
                            "toName": "三贤路与北环路交叉",
                            "coords": [
                                [
                                    112.1269,
                                    32.6976
                                ],
                                [
                                    112.0874,
                                    32.6954
                                ]
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "series": [
                {
                    "zlevel": 1,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0.7,
                        "color": "red",
                        "symbolSize": 3
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "三贤路与北环路交叉",
                            "toName": "刁河大桥",
                            "coords": [
                                [
                                    112.0874,
                                    32.6954
                                ],
                                [
                                    112.0409,
                                    32.6434
                                ]
                            ]
                        }
                    ]
                },
                {
                    "zlevel": 2,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0,
                        "symbol": "path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z",
                        "symbolSize": 15
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "opacity": 0.4,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "三贤路与北环路交叉",
                            "toName": "刁河大桥",
                            "coords": [
                                [
                                    112.0874,
                                    32.6954
                                ],
                                [
                                    112.0409,
                                    32.6434
                                ]
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "series": [
                {
                    "zlevel": 1,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0.7,
                        "color": "red",
                        "symbolSize": 3
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "刁河大桥",
                            "toName": "邓南路湍河桥",
                            "coords": [
                                [
                                    112.0409,
                                    32.6434
                                ],
                                [
                                    112.1269,
                                    32.6976
                                ]
                            ]
                        }
                    ]
                },
                {
                    "zlevel": 2,
                    "effect": {
                        "show": true,
                        "period": 3,
                        "trailLength": 0,
                        "symbol": "path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z",
                        "symbolSize": 15
                    },
                    "lineStyle": {
                        "normal": {
                            "color": "red",
                            "width": 0,
                            "opacity": 0.4,
                            "curveness": 0.2
                        }
                    },
                    "data": [
                        {
                            "fromName": "刁河大桥",
                            "toName": "邓南路湍河桥",
                            "coords": [
                                [
                                    112.0409,
                                    32.6434
                                ],
                                [
                                    112.1269,
                                    32.6976
                                ]
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

Other comments [其他信息]

截图实在表示不出我要描述的效果,实在抱歉.

ZhuGYao avatar Mar 19 '18 03:03 ZhuGYao

残影问题在后续的 echarts 版本中已经有修复。不知升级到 3.8.4 你的问题是否仍存在。

100pah avatar Mar 20 '18 18:03 100pah

我现在改用的3.8.5,但还是出错,并不单纯的是残影问题,而是我点击时间轴进行时间点选中的时候,他并不是在本次时间坐标的起点开始播放,而是从路线中间进行绘制轨迹进行运行,运行到终点以后,然后又在起点开始播放,然后播放一半。 @100pah

ZhuGYao avatar Mar 21 '18 01:03 ZhuGYao

bug 大致就是我描述的这种错,应该不是我配置问题,如果是我配置问题应该会是一开始就出错,而不是运行一段时间后出错。另外非常感谢您的帮助,谢谢! @100pah

ZhuGYao avatar Mar 21 '18 02:03 ZhuGYao

不管能不能解决,能麻烦说明一下吗?万分感激!!!非常感谢!!!因为困在这个问题很久了。 @100pah @leeight @cnberg @xvaara @firede

ZhuGYao avatar Mar 23 '18 06:03 ZhuGYao

这到底是不是bug???还是我配置错误??求解,谢谢大佬!!! @100pah @leeight @cnberg @xvaara @firede

ZhuGYao avatar Mar 26 '18 03:03 ZhuGYao

希望大佬们能给一个回复,谢谢!!! @100pah @leeight @cnberg @xvaara @firede

ZhuGYao avatar Mar 28 '18 02:03 ZhuGYao