fix for #660 -- feature.vector.attributes now correctly instantiated.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3066 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-04-11 21:08:45 +00:00
parent b02522ea4c
commit 4ec005c06c

View File

@@ -27,10 +27,10 @@ OpenLayers.Feature.Vector.prototype =
/** @type OpenLayers.Geometry */
geometry:null,
/** @type array */
attributes: {},
/** @type Object */
attributes: null,
/** @type strinng */
/** @type String */
state: null,
/** @type Object */
@@ -48,9 +48,10 @@ OpenLayers.Feature.Vector.prototype =
this.lonlat = null;
this.geometry = geometry;
this.state = null;
this.attributes = new Object();
if (data) {
OpenLayers.Util.extend(this.attributes, data);
}
this.attributes = OpenLayers.Util.extend(this.attributes, data);
}
this.style = style ? style : null;
},