Use oriented rings where needed

This commit is contained in:
Tom Payne
2014-01-21 08:01:16 +01:00
parent 04092dac75
commit ffc27719ea
2 changed files with 5 additions and 5 deletions

View File

@@ -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_;

View File

@@ -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;