From 4ec005c06cb9053e537fab4c3fc126c013c839fe Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 11 Apr 2007 21:08:45 +0000 Subject: [PATCH] fix for #660 -- feature.vector.attributes now correctly instantiated. git-svn-id: http://svn.openlayers.org/trunk/openlayers@3066 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Feature/Vector.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js index dd03caad56..4e6e9d6bf0 100644 --- a/lib/OpenLayers/Feature/Vector.js +++ b/lib/OpenLayers/Feature/Vector.js @@ -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; },