Can't setPosition before image exists.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@96 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -18,10 +18,12 @@ OpenLayers.Tile.Image.prototype =
|
|||||||
* @param OpenLayers.Pixel
|
* @param OpenLayers.Pixel
|
||||||
*/
|
*/
|
||||||
setPosition:function(point) {
|
setPosition:function(point) {
|
||||||
this.img.style.top = point.y+"px";
|
if (img) {
|
||||||
this.img.style.left = point.x+"px";
|
this.img.style.top = point.y+"px";
|
||||||
this.img.style.position = "absolute";
|
this.img.style.left = point.x+"px";
|
||||||
this.position = point;
|
this.img.style.position = "absolute";
|
||||||
|
this.position = point;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getPosition: function() {
|
getPosition: function() {
|
||||||
return this.position;
|
return this.position;
|
||||||
|
|||||||
Reference in New Issue
Block a user