diff --git a/lib/OpenLayers/Icon.js b/lib/OpenLayers/Icon.js index 406365a070..b8c4bf605a 100644 --- a/lib/OpenLayers/Icon.js +++ b/lib/OpenLayers/Icon.js @@ -25,7 +25,8 @@ OpenLayers.Icon.prototype = { initialize: function(url, size, offset) { this.size = size; this.url = url; - this.offset = (offset) ? offset : new OpenLayers.Pixel(0, 0); + this.offset = (offset) ? offset : + new OpenLayers.Pixel(-(size.w/2), -size.h); }, /**