From 525c40fd4d4b175b2d30be9182af94dda15d74da Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 18 May 2006 18:29:31 +0000 Subject: [PATCH] take advantage of createImage to set the position on creation. change point to pixel git-svn-id: http://svn.openlayers.org/trunk/openlayers@159 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Tile/Image.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index ac63a1eedb..44ccee5818 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -24,18 +24,19 @@ OpenLayers.Tile.Image.prototype = draw:function() { OpenLayers.Tile.prototype.draw.apply(this, arguments); this.img = OpenLayers.Util.createImage(this.url, - this.size); + this.size, + null, + "absolute"); }, /** * @param OpenLayers.Pixel */ - setPosition:function(point) { + setPosition:function(pixel) { if (this.img) { - this.img.style.top = point.y + "px"; - this.img.style.left = point.x + "px"; - this.img.style.position = "absolute"; - this.position = point; + this.img.style.top = pixel.y + "px"; + this.img.style.left = pixel.x + "px"; + this.position = pixel; } },