[OpenLayers-Commits] r7327 - sandbox/tschaub/olon/lib/OpenLayers/Layer
commits at openlayers.org
commits at openlayers.org
Fri Jun 6 16:19:23 EDT 2008
Author: tschaub
Date: 2008-06-06 16:19:23 -0400 (Fri, 06 Jun 2008)
New Revision: 7327
Modified:
sandbox/tschaub/olon/lib/OpenLayers/Layer/Vector.js
Log:
serializing features
Modified: sandbox/tschaub/olon/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/tschaub/olon/lib/OpenLayers/Layer/Vector.js 2008-06-06 20:18:35 UTC (rev 7326)
+++ sandbox/tschaub/olon/lib/OpenLayers/Layer/Vector.js 2008-06-06 20:19:23 UTC (rev 7327)
@@ -160,7 +160,8 @@
* {Object}
*/
serializable: {
- "args": ["name"]
+ "args": ["name"],
+ "props": ["features"]
},
/**
@@ -199,9 +200,13 @@
if (!this.styleMap) {
this.styleMap = new OpenLayers.StyleMap();
}
-
- this.features = [];
- this.selectedFeatures = [];
+
+ if(!this.features) {
+ this.features = [];
+ }
+ if(!this.selectedFeatures) {
+ this.selectedFeatures = [];
+ }
},
/**
More information about the Commits
mailing list