Simplify geometries to a tolerance of half a device pixel
This commit is contained in:
@@ -237,8 +237,9 @@ ol.renderer.canvas.VectorLayer.prototype.renderFeature =
|
|||||||
if (!goog.isDefAndNotNull(styles)) {
|
if (!goog.isDefAndNotNull(styles)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// simplify to a tolerance of half a CSS pixel
|
// simplify to a tolerance of half a device pixel
|
||||||
var squaredTolerance = resolution * resolution / 4;
|
var squaredTolerance =
|
||||||
|
resolution * resolution / (4 * pixelRatio * pixelRatio);
|
||||||
var i, ii, style, imageStyle, imageState;
|
var i, ii, style, imageStyle, imageState;
|
||||||
for (i = 0, ii = styles.length; i < ii; ++i) {
|
for (i = 0, ii = styles.length; i < ii; ++i) {
|
||||||
style = styles[i];
|
style = styles[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user