Add option to skip first coordinate for use with closePath()

This commit is contained in:
Andreas Hocevar
2016-09-13 01:54:53 +02:00
parent 430aee95fd
commit e7bc7121d6
6 changed files with 64 additions and 24 deletions

View File

@@ -75,7 +75,7 @@ ol.inherits(ol.render.canvas.LineStringReplay, ol.render.canvas.Replay);
ol.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_ = function(flatCoordinates, offset, end, stride) {
var myBegin = this.coordinates.length;
var myEnd = this.appendFlatCoordinates(
flatCoordinates, offset, end, stride, false);
flatCoordinates, offset, end, stride, false, false);
var moveToLineToInstruction =
[ol.render.canvas.Instruction.MOVE_TO_LINE_TO, myBegin, myEnd];
this.instructions.push(moveToLineToInstruction);