Return popup when created. If we don'tn get an offset, leave it null: let OL.Icon calculate it. fix typo in case.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@422 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -40,7 +40,7 @@ OpenLayers.Feature.prototype= {
|
||||
this.layer = layer;
|
||||
this.lonlat = lonlat;
|
||||
this.data = data;
|
||||
this.id = (id ? id : 'f'+Math.Random());
|
||||
this.id = (id ? id : 'f'+Math.random());
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -65,9 +65,8 @@ OpenLayers.Feature.prototype= {
|
||||
|
||||
var imgSize = (this.data.iconSize) ? this.data.iconSize
|
||||
: new OpenLayers.Size(25, 25);
|
||||
|
||||
var imgOffset = (this.data.iconOffset) ? this.data.iconOffset
|
||||
: new OpenLayers.Pixel(0,0);
|
||||
: null;
|
||||
|
||||
this.icon = new OpenLayers.Icon(imgURL, imgSize, imgOffset);
|
||||
|
||||
@@ -95,7 +94,7 @@ OpenLayers.Feature.prototype= {
|
||||
this.data.popupContentHTML,
|
||||
anchorSize);
|
||||
}
|
||||
|
||||
return this.popup;
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Feature"
|
||||
|
||||
Reference in New Issue
Block a user