Changeset 251
- Timestamp:
- 05/22/06 07:09:27 (3 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Marker.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Marker.js
r249 r251 1 /** 2 * @class 3 */ 1 4 OpenLayers.Marker = Class.create(); 2 5 OpenLayers.Marker.prototype = { … … 13 16 data: null, 14 17 15 /** @type */18 /** @type OpenLayers.Events*/ 16 19 events: null, 17 20 … … 19 22 map: null, 20 23 21 object: null, 22 23 events:null, 24 /** @type DOMElement */ 25 image: null, 24 26 25 27 /** 28 * @constructor 29 * 26 30 * @param {OpenLayers.Icon} icon 27 31 * @param {OpenLayers.LonLat lonlat … … 30 34 this.icon = icon; 31 35 this.lonlat = lonlat; 32 this.object = OpenLayers.Util.createImage( 33 this.icon.url, 34 this.icon.size, 35 null, 36 "absolute" 37 ); 38 this.events = new OpenLayers.Events(this, this.object, null); 36 this.image = OpenLayers.Util.createImage(this.icon.url, 37 this.icon.size, 38 null, 39 "absolute" 40 ); 41 this.events = new OpenLayers.Events(this, this.image, null); 39 42 }, 40 43 … … 47 50 */ 48 51 draw: function(pixel) { 49 this. object.style.top = (pixel.y + this.icon.offset.y) + "px"50 this. object.style.left = (pixel.x + this.icon.offset.x) + "px";51 return this. object;52 this.image.style.top = (pixel.y + this.icon.offset.y) + "px" 53 this.image.style.left = (pixel.x + this.icon.offset.x) + "px"; 54 return this.image; 52 55 }, 53 56
