Add MultiPolygon drawing to batch
This commit is contained in:
@@ -209,6 +209,33 @@ ol.replay.canvas.Batch.prototype.drawMultiLineStringGeometry =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.replay.canvas.Batch.prototype.drawMultiPolygonGeometry =
|
||||||
|
function(multiPolygonGeometry) {
|
||||||
|
goog.asserts.assert(!goog.isNull(this.state_));
|
||||||
|
var ringss = multiPolygonGeometry.getRingss();
|
||||||
|
var i, ii;
|
||||||
|
for (i = 0, ii = ringss.length; i < ii; ++i) {
|
||||||
|
var rings = ringss[i];
|
||||||
|
var j, jj;
|
||||||
|
for (j = 0, jj = rings.length; j < jj; ++j) {
|
||||||
|
this.beginPath_();
|
||||||
|
this.instructions_.push({
|
||||||
|
type: ol.replay.canvas.InstructionType.MOVE_TO_LINE_TO,
|
||||||
|
argument: this.appendCoordinates_(rings[j], true)
|
||||||
|
});
|
||||||
|
this.instructions_.push({
|
||||||
|
type: ol.replay.canvas.InstructionType.CLOSE_PATH
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.state_.fillPending = true;
|
||||||
|
this.state_.strokePending = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -41,6 +41,14 @@ ol.replay.IBatch.prototype.drawMultiLineStringGeometry =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ol.geom.MultiPolygon} multiPolygonGeometry Multi polygon geometry.
|
||||||
|
*/
|
||||||
|
ol.replay.IBatch.prototype.drawMultiPolygonGeometry =
|
||||||
|
function(multiPolygonGeometry) {
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.geom.Polygon} polygonGeometry Polygon geometry.
|
* @param {ol.geom.Polygon} polygonGeometry Polygon geometry.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user