diff --git a/lib/OpenLayers/Layer/Text.js b/lib/OpenLayers/Layer/Text.js index fada5b4883..e655275a72 100644 --- a/lib/OpenLayers/Layer/Text.js +++ b/lib/OpenLayers/Layer/Text.js @@ -9,6 +9,7 @@ OpenLayers.Layer.Text.prototype = /** store url of text file * @type str */ location:null, + /** * @constructor * @@ -74,7 +75,6 @@ OpenLayers.Layer.Text.prototype = } if (set) { var data = new Object(); - if (url != null) { data.icon = new OpenLayers.Icon(url, iconSize, @@ -90,7 +90,9 @@ OpenLayers.Layer.Text.prototype = } } - data['popupContentHTML'] = '
'+description+'
'; + if ((title != null) && (description != null)) { + data['popupContentHTML'] = ''+description+'
'; + } var feature = new OpenLayers.Feature(this, location, data); var marker = feature.createMarker(); marker.events.register('click', feature, this.markerClick);