From 4e94908440b6e697f60e80a8e062fed04656ae85 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Fri, 8 May 2015 11:14:45 +0200 Subject: [PATCH] Define getCoordinates and setCoordinates in the base class Since these methods are implemented by all subclasses, it makes sense to define them in the base class as abstract method. --- src/ol/geom/simplegeometry.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ol/geom/simplegeometry.js b/src/ol/geom/simplegeometry.js index c2991011bb..e99e5479b9 100644 --- a/src/ol/geom/simplegeometry.js +++ b/src/ol/geom/simplegeometry.js @@ -98,6 +98,12 @@ ol.geom.SimpleGeometry.prototype.computeExtent = function(extent) { }; +/** + * @return {Array} Coordinates. + */ +ol.geom.SimpleGeometry.prototype.getCoordinates = goog.abstractMethod; + + /** * Return the first coordinate of the geometry. * @return {ol.Coordinate} First coordinate. @@ -209,6 +215,13 @@ ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal = }; +/** + * @param {Array} coordinates Coordinates. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. + */ +ol.geom.SimpleGeometry.prototype.setCoordinates = goog.abstractMethod; + + /** * @param {ol.geom.GeometryLayout|undefined} layout Layout. * @param {Array} coordinates Coordinates.