Only call beginPath once per MultiPolygon

This commit is contained in:
Tim Schaub
2016-09-26 06:13:01 -06:00
parent d8fbc09326
commit f444800fc6
5 changed files with 123 additions and 8 deletions

View File

@@ -681,16 +681,16 @@ ol.render.canvas.Immediate.prototype.drawMultiPolygon = function(geometry) {
var endss = geometry.getEndss();
var stride = geometry.getStride();
var i, ii;
context.beginPath();
for (i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
context.beginPath();
offset = this.drawRings_(flatCoordinates, offset, ends, stride);
if (this.fillState_) {
context.fill();
}
if (this.strokeState_) {
context.stroke();
}
}
if (this.fillState_) {
context.fill();
}
if (this.strokeState_) {
context.stroke();
}
}
if (this.text_ !== '') {