Create the metadata object in the initialize function, otherwise any assignment to an instance of an OpenLayers.Layer class or subclass add/modifies those properties on the OpenLayers.Layer prototype

This commit is contained in:
Matt Priour
2012-01-18 14:41:41 -06:00
parent a34dd40869
commit 55b52c6c9f

View File

@@ -329,7 +329,7 @@ OpenLayers.Layer = OpenLayers.Class({
* {Object} This object can be used to store additional information on a
* layer object.
*/
metadata: {},
metadata: null,
/**
* Constructor: OpenLayers.Layer
@@ -340,6 +340,8 @@ OpenLayers.Layer = OpenLayers.Class({
*/
initialize: function(name, options) {
this.metadata = {};
this.addOptions(options);
this.name = name;