Don't display a popup or register events on a Text layer that doesn't have both title and description. Fixes #471.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2820 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -126,7 +126,9 @@ OpenLayers.Layer.Text.prototype =
|
||||
var feature = new OpenLayers.Feature(this, location, data);
|
||||
this.features.push(feature);
|
||||
var marker = feature.createMarker();
|
||||
marker.events.register('click', feature, this.markerClick);
|
||||
if ((title != null) && (description != null)) {
|
||||
marker.events.register('click', feature, this.markerClick);
|
||||
}
|
||||
this.addMarker(marker);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user