diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index e891899d29..d9043bb87b 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -66,7 +66,10 @@ OpenLayers.Feature.prototype= { var imgSize = (this.data.iconSize) ? this.data.iconSize : new OpenLayers.Size(25, 25); - this.icon = new OpenLayers.Icon(imgURL, imgSize); + var imgOffset = (this.data.iconOffset) ? this.data.iconOffset + : new OpenLayers.Pixel(0,0); + + this.icon = new OpenLayers.Icon(imgURL, imgSize, imgOffset); this.marker = new OpenLayers.Marker(this.lonlat, this.icon);