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) {
|
if (set) {
|
||||||
var data = {};
|
var data = new Object();
|
||||||
data['iconURL'] = url;
|
|
||||||
data['iconSize'] = iconSize;
|
if (url != null) {
|
||||||
data['iconOffset'] = iconOffset;
|
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>';
|
data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>';
|
||||||
var feature = new OpenLayers.Feature(this, location, data);
|
var feature = new OpenLayers.Feature(this, location, data);
|
||||||
var marker = feature.createMarker();
|
var marker = feature.createMarker();
|
||||||
|
|||||||
Reference in New Issue
Block a user