give a feature a default, blank data

git-svn-id: http://svn.openlayers.org/trunk/openlayers@437 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-29 08:48:54 +00:00
parent 528b9ef24e
commit 3f44628b44

View File

@@ -39,7 +39,7 @@ OpenLayers.Feature.prototype= {
initialize: function(layer, lonlat, data, id) {
this.layer = layer;
this.lonlat = lonlat;
this.data = data;
this.data = (data != null) ? data : new Object();
this.id = (id ? id : 'f'+Math.random());
},