diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index bc1ac7126c..e70b63a6cf 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -40,7 +40,7 @@ OpenLayers.Feature.prototype= { this.layer = layer; this.lonlat = lonlat; this.data = data; - this.id = (id ? id : 'f'+Math.Random()); + this.id = (id ? id : 'f'+Math.random()); }, /** @@ -65,9 +65,8 @@ OpenLayers.Feature.prototype= { var imgSize = (this.data.iconSize) ? this.data.iconSize : new OpenLayers.Size(25, 25); - var imgOffset = (this.data.iconOffset) ? this.data.iconOffset - : new OpenLayers.Pixel(0,0); + : null; this.icon = new OpenLayers.Icon(imgURL, imgSize, imgOffset); @@ -95,7 +94,7 @@ OpenLayers.Feature.prototype= { this.data.popupContentHTML, anchorSize); } - + return this.popup; }, CLASS_NAME: "OpenLayers.Feature"