Icon: use simple ojects for size and offset
This commit is contained in:
@@ -68,8 +68,8 @@ OpenLayers.Icon = OpenLayers.Class({
|
||||
*/
|
||||
initialize: function(url, size, offset, calculateOffset) {
|
||||
this.url = url;
|
||||
this.size = (size) ? size : new OpenLayers.Size(20,20);
|
||||
this.offset = offset ? offset : new OpenLayers.Pixel(-(this.size.w/2), -(this.size.h/2));
|
||||
this.size = size || {w: 20, h: 20};
|
||||
this.offset = offset || {x: -(this.size.w/2), y: -(this.size.h/2)};
|
||||
this.calculateOffset = calculateOffset;
|
||||
|
||||
var id = OpenLayers.Util.createUniqueID("OL_Icon_");
|
||||
|
||||
Reference in New Issue
Block a user