JSDOC / coding standards OpenLayers.Tile.Image
git-svn-id: http://svn.openlayers.org/trunk/openlayers@158 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,32 +1,52 @@
|
|||||||
|
/**
|
||||||
|
* @class
|
||||||
|
*/
|
||||||
OpenLayers.Tile.Image = Class.create();
|
OpenLayers.Tile.Image = Class.create();
|
||||||
OpenLayers.Tile.Image.prototype =
|
OpenLayers.Tile.Image.prototype =
|
||||||
Object.extend( new OpenLayers.Tile(), {
|
Object.extend( new OpenLayers.Tile(), {
|
||||||
|
|
||||||
// {DOMElement} img
|
/** @type DOMElement img */
|
||||||
img:null,
|
img:null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
*
|
||||||
|
* @param {OpenLayers.Bounds} bounds
|
||||||
|
* @param {String} url
|
||||||
|
* @param {OpenLayers.Size} size
|
||||||
|
*/
|
||||||
initialize: function(bounds,url,size) {
|
initialize: function(bounds,url,size) {
|
||||||
OpenLayers.Tile.prototype.initialize.apply(this,arguments);
|
OpenLayers.Tile.prototype.initialize.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
draw:function() {
|
draw:function() {
|
||||||
OpenLayers.Tile.prototype.draw.apply(this, arguments);
|
OpenLayers.Tile.prototype.draw.apply(this, arguments);
|
||||||
this.img = OpenLayers.Util.createImage(this.url,
|
this.img = OpenLayers.Util.createImage(this.url,
|
||||||
this.size);
|
this.size);
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
|
/**
|
||||||
* @param OpenLayers.Pixel
|
* @param OpenLayers.Pixel
|
||||||
*/
|
*/
|
||||||
setPosition:function(point) {
|
setPosition:function(point) {
|
||||||
if (this.img) {
|
if (this.img) {
|
||||||
this.img.style.top = point.y+"px";
|
this.img.style.top = point.y + "px";
|
||||||
this.img.style.left = point.x+"px";
|
this.img.style.left = point.x + "px";
|
||||||
this.img.style.position = "absolute";
|
this.img.style.position = "absolute";
|
||||||
this.position = point;
|
this.position = point;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type OpenLayers.Pixel
|
||||||
|
*/
|
||||||
getPosition: function() {
|
getPosition: function() {
|
||||||
return this.position;
|
return this.position;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
/** @final @type String */
|
||||||
|
CLASS_NAME: "OpenLayers.Tile.Image"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user