Google 地图 API 重叠方向显示

Google maps API Overlap DirectionDisplay

我有一个非常具体的问题... 我在网站启动时显示:

之后每两分钟我删除一次实际的非绿色路线,然后加载其他路线但颜色特定,我希望这些路线位于绿色路线的前面,但恰好加载 3 次后它们自动放在后面...

希望很明确,感谢您的关注

这里有两张图来说明:

When they aren't behind the green

When they are behind the green

        polylineOptions: {
            strokeColor: strokecolor,       // Color
            strokeOpacity: strokeopacity,   // Opacity
            strokeWeight: strokeweight,     // Weight
        },

收件人:

        polylineOptions: {
            strokeColor: strokecolor,       // Color
            strokeOpacity: strokeopacity,   // Opacity
            strokeWeight: strokeweight,     // Weight
            zIndex: zindex                  // Priority display index
        },