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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user