read icon.offset from data object. default to (0,0)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@415 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user