Close the polygon created by ol.render.Box

This commit is contained in:
Éric Lemoine
2014-02-04 16:14:45 +01:00
parent 016efd22d1
commit 3c981da304

View File

@@ -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]);
};