update text layer to new paradigm
git-svn-id: http://svn.openlayers.org/trunk/openlayers@452 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -73,10 +73,23 @@ OpenLayers.Layer.Text.prototype =
|
||||
}
|
||||
}
|
||||
if (set) {
|
||||
var data = {};
|
||||
data['iconURL'] = url;
|
||||
data['iconSize'] = iconSize;
|
||||
data['iconOffset'] = iconOffset;
|
||||
var data = new Object();
|
||||
|
||||
if (url != null) {
|
||||
data.icon = new OpenLayers.Icon(url,
|
||||
iconSize,
|
||||
iconOffset);
|
||||
} else {
|
||||
data.icon = OpenLayers.Marker.defaultIcon();
|
||||
|
||||
//allows for the case where the image url is not
|
||||
// specified but the size is. use a default icon
|
||||
// but change the size
|
||||
if (iconSize != null) {
|
||||
data.icon.setSize(iconSize);
|
||||
}
|
||||
|
||||
}
|
||||
data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>';
|
||||
var feature = new OpenLayers.Feature(this, location, data);
|
||||
var marker = feature.createMarker();
|
||||
|
||||
Reference in New Issue
Block a user