Implement clone for simple geometries

This commit is contained in:
Tom Payne
2013-12-11 15:03:56 +01:00
parent 6295fa6088
commit 802d1644bb
14 changed files with 80 additions and 0 deletions

View File

@@ -36,6 +36,16 @@ ol.geom.LineString = function(coordinates, opt_layout) {
goog.inherits(ol.geom.LineString, ol.geom.SimpleGeometry);
/**
* @inheritDoc
*/
ol.geom.LineString.prototype.clone = function() {
var lineString = new ol.geom.LineString(null);
lineString.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
return lineString;
};
/**
* @inheritDoc
*/