From 3c981da304d0d32fffe7982f0c9606c5e543bf8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 4 Feb 2014 16:14:45 +0100 Subject: [PATCH] Close the polygon created by ol.render.Box --- src/ol/render/box.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol/render/box.js b/src/ol/render/box.js index b0810c7c9e..143ef85c64 100644 --- a/src/ol/render/box.js +++ b/src/ol/render/box.js @@ -78,6 +78,8 @@ ol.render.Box.prototype.createGeometry_ = function() { ]; var coordinates = goog.array.map(pixels[0], this.map_.getCoordinateFromPixel, this.map_); + // close the polygon + coordinates[4] = coordinates[0].slice(); return new ol.geom.Polygon([coordinates]); };