From 1408a26b58c6a622cf0958aec1665f8e1457fd24 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sat, 27 May 2006 13:10:41 +0000 Subject: [PATCH] Our default marker is designed to be positioned above and centered on a point. Change it so that Icon.js does this by default. git-svn-id: http://svn.openlayers.org/trunk/openlayers@423 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Icon.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }, /**