diff --git a/lib/OpenLayers/Marker.js b/lib/OpenLayers/Marker.js index 472308c3d6..e29a941399 100644 --- a/lib/OpenLayers/Marker.js +++ b/lib/OpenLayers/Marker.js @@ -1,3 +1,6 @@ +/** +* @class +*/ OpenLayers.Marker = Class.create(); OpenLayers.Marker.prototype = { @@ -12,30 +15,30 @@ OpenLayers.Marker.prototype = { * @type Object */ data: null, - /** @type */ + /** @type OpenLayers.Events*/ events: null, /** @type OpenLayers.Map */ map: null, - object: null, - - events:null, + /** @type DOMElement */ + image: null, /** + * @constructor + * * @param {OpenLayers.Icon} icon * @param {OpenLayers.LonLat lonlat */ initialize: function(lonlat, icon) { this.icon = icon; this.lonlat = lonlat; - this.object = OpenLayers.Util.createImage( - this.icon.url, - this.icon.size, - null, - "absolute" - ); - this.events = new OpenLayers.Events(this, this.object, null); + this.image = OpenLayers.Util.createImage(this.icon.url, + this.icon.size, + null, + "absolute" + ); + this.events = new OpenLayers.Events(this, this.image, null); }, /** @@ -46,9 +49,9 @@ OpenLayers.Marker.prototype = { * @type DOMElement */ draw: function(pixel) { - this.object.style.top = (pixel.y + this.icon.offset.y) + "px" - this.object.style.left = (pixel.x + this.icon.offset.x) + "px"; - return this.object; + this.image.style.top = (pixel.y + this.icon.offset.y) + "px" + this.image.style.left = (pixel.x + this.icon.offset.x) + "px"; + return this.image; }, /** @final @type String */