diff --git a/src/ol/geom/multipolygon.js b/src/ol/geom/multipolygon.js index 01d5a5c48c..debf57125d 100644 --- a/src/ol/geom/multipolygon.js +++ b/src/ol/geom/multipolygon.js @@ -94,7 +94,7 @@ ol.geom.MultiPolygon.prototype.closestPointXY = this.maxDeltaRevision_ = this.getRevision(); } return ol.geom.closest.getssClosestPoint( - this.flatCoordinates, 0, this.endss_, this.stride, + this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance); }; @@ -104,7 +104,7 @@ ol.geom.MultiPolygon.prototype.closestPointXY = */ ol.geom.MultiPolygon.prototype.containsXY = function(x, y) { return ol.geom.flat.linearRingssContainsXY( - this.flatCoordinates, 0, this.endss_, this.stride, x, y); + this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y); }; @@ -113,7 +113,7 @@ ol.geom.MultiPolygon.prototype.containsXY = function(x, y) { */ ol.geom.MultiPolygon.prototype.getArea = function() { return ol.geom.flat.linearRingssArea( - this.flatCoordinates, 0, this.endss_, this.stride); + this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride); }; @@ -142,7 +142,7 @@ ol.geom.MultiPolygon.prototype.getInteriorPoints = function() { var ys = ol.geom.flat.linearRingssMidYs( this.flatCoordinates, 0, this.endss_, this.stride); this.interiorPoints_ = ol.geom.flat.linearRingssGetInteriorPoints( - this.flatCoordinates, 0, this.endss_, this.stride, ys); + this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, ys); this.interiorPointsRevision_ = this.getRevision(); } return this.interiorPoints_; diff --git a/src/ol/render/canvas/canvasreplay.js b/src/ol/render/canvas/canvasreplay.js index 846e00ff48..e3c7634c59 100644 --- a/src/ol/render/canvas/canvasreplay.js +++ b/src/ol/render/canvas/canvasreplay.js @@ -1132,7 +1132,7 @@ ol.render.canvas.PolygonReplay.prototype.drawMultiPolygonGeometry = state.miterLimit, state.lineDash]); } var endss = multiPolygonGeometry.getEndss(); - var flatCoordinates = multiPolygonGeometry.getFlatCoordinates(); + var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates(); var stride = multiPolygonGeometry.getStride(); var offset = 0; var i, ii;