diff --git a/lib/OpenLayers/Layer/Boxes.js b/lib/OpenLayers/Layer/Boxes.js index a3e2f99c73..91c3d49cad 100644 --- a/lib/OpenLayers/Layer/Boxes.js +++ b/lib/OpenLayers/Layer/Boxes.js @@ -49,10 +49,10 @@ OpenLayers.Layer.Boxes = OpenLayers.Class(OpenLayers.Layer.Markers, { if (botright == null || topleft == null) { marker.display(false); } else { - var sz = new OpenLayers.Size( - Math.max(1, botright.x - topleft.x), - Math.max(1, botright.y - topleft.y)); - var markerDiv = marker.draw(topleft, sz); + var markerDiv = marker.draw(topleft, { + w: Math.max(1, botright.x - topleft.x), + h: Math.max(1, botright.y - topleft.y) + }); if (!marker.drawn) { this.div.appendChild(markerDiv); marker.drawn = true;