diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index 937079bf02..a1ae17778e 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -104,7 +104,7 @@ ol.geom.Polygon.prototype.closestPointXY = */ ol.geom.Polygon.prototype.containsXY = function(x, y) { return ol.geom.flat.linearRingsContainsXY( - this.flatCoordinates, 0, this.ends_, this.stride, x, y); + this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y); }; @@ -113,7 +113,7 @@ ol.geom.Polygon.prototype.containsXY = function(x, y) { */ ol.geom.Polygon.prototype.getArea = function() { return ol.geom.flat.linearRingsArea( - this.flatCoordinates, 0, this.ends_, this.stride); + this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride); }; @@ -142,7 +142,7 @@ ol.geom.Polygon.prototype.getInteriorPoint = function() { var extent = this.getExtent(); var y = (extent[1] + extent[3]) / 2; this.interiorPoint_ = ol.geom.flat.linearRingsGetInteriorPoint( - this.flatCoordinates, 0, this.ends_, this.stride, y); + this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, y); this.interiorPointRevision_ = this.getRevision(); } return this.interiorPoint_; diff --git a/src/ol/render/canvas/canvasreplay.js b/src/ol/render/canvas/canvasreplay.js index 5628b84b9e..846e00ff48 100644 --- a/src/ol/render/canvas/canvasreplay.js +++ b/src/ol/render/canvas/canvasreplay.js @@ -1096,7 +1096,7 @@ ol.render.canvas.PolygonReplay.prototype.drawPolygonGeometry = state.miterLimit, state.lineDash]); } var ends = polygonGeometry.getEnds(); - var flatCoordinates = polygonGeometry.getFlatCoordinates(); + var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates(); var stride = polygonGeometry.getStride(); this.drawFlatCoordinatess_(flatCoordinates, 0, ends, stride); this.endGeometry(polygonGeometry, data);