Implement clone for simple geometries
This commit is contained in:
@@ -55,6 +55,17 @@ ol.geom.Polygon = function(coordinates, opt_layout) {
|
||||
goog.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry);
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.geom.Polygon.prototype.clone = function() {
|
||||
var polygon = new ol.geom.Polygon(null);
|
||||
polygon.setFlatCoordinates(
|
||||
this.layout, this.flatCoordinates.slice(), this.ends_.slice());
|
||||
return polygon;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user