diff --git a/src/ol/render/webgl/imagereplay/index.js b/src/ol/render/webgl/imagereplay/index.js index 5e8eff36a2..a0b5306d8f 100644 --- a/src/ol/render/webgl/imagereplay/index.js +++ b/src/ol/render/webgl/imagereplay/index.js @@ -1202,7 +1202,7 @@ ol.render.webgl.LineStringReplay.prototype.drawCoordinates_ = function(flatCoord if (closed) { //Link the last triangle/rhombus to the first one. - this.indices_[numIndices++] = lastIndex; + this.indices_[numIndices++] = lastSign > 0 ? lastIndex : lastIndex - 1; this.indices_[numIndices++] = startIndex + 2; this.indices_[numIndices++] = startIndex;