From 40eb21f44503052cac7476f4686d825b87cb80bc Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 23 Jan 2014 02:08:42 +0100 Subject: [PATCH] Replace ol.geom.Polygon#getInteriorPoint with getFlatInteriorPoint --- src/ol/geom/polygon.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index 34787a4c75..d60b25fc7d 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -31,13 +31,13 @@ ol.geom.Polygon = function(coordinates, opt_layout) { * @private * @type {number} */ - this.interiorPointRevision_ = -1; + this.flatInteriorPointRevision_ = -1; /** * @private * @type {ol.Coordinate} */ - this.interiorPoint_ = null; + this.flatInteriorPoint_ = null; /** * @private @@ -138,17 +138,17 @@ ol.geom.Polygon.prototype.getEnds = function() { /** - * @return {ol.Coordinate} Interior point. + * @return {Array.} Interior point. */ -ol.geom.Polygon.prototype.getInteriorPoint = function() { - if (this.interiorPointRevision_ != this.getRevision()) { +ol.geom.Polygon.prototype.getFlatInteriorPoint = function() { + if (this.flatInteriorPointRevision_ != this.getRevision()) { var extent = this.getExtent(); var y = (extent[1] + extent[3]) / 2; - this.interiorPoint_ = ol.geom.flat.linearRingsGetInteriorPoint( + this.flatInteriorPoint_ = ol.geom.flat.linearRingsGetInteriorPoint( this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, y); - this.interiorPointRevision_ = this.getRevision(); + this.flatInteriorPointRevision_ = this.getRevision(); } - return this.interiorPoint_; + return this.flatInteriorPoint_; };