changing function name from generateMarker to draw() to remain consistent with other areas of the code. (specifically OpenLayers.Control, whouses the draw() function to render the control and return a link to the div)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@249 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -31,7 +31,9 @@ OpenLayers.Marker.prototype = {
|
||||
this.lonlat = lonlat;
|
||||
this.object = OpenLayers.Util.createImage(
|
||||
this.icon.url,
|
||||
this.icon.size
|
||||
this.icon.size,
|
||||
null,
|
||||
"absolute"
|
||||
);
|
||||
this.events = new OpenLayers.Events(this, this.object, null);
|
||||
},
|
||||
@@ -43,12 +45,9 @@ OpenLayers.Marker.prototype = {
|
||||
* location passed-in
|
||||
* @type DOMElement
|
||||
*/
|
||||
generateMarker: function(pixel) {
|
||||
// Create a div here, and set the location to the pixel above modified
|
||||
// by the icon size.
|
||||
this.object.style.top = (pixel.y+this.icon.offset.y) + "px"
|
||||
this.object.style.left = (pixel.x+this.icon.offset.x) + "px";
|
||||
this.object.style.position = "absolute";
|
||||
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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user