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
|
* {Object} This object can be used to store additional information on a
|
||||||
* layer object.
|
* layer object.
|
||||||
*/
|
*/
|
||||||
metadata: {},
|
metadata: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor: OpenLayers.Layer
|
* Constructor: OpenLayers.Layer
|
||||||
@@ -340,6 +340,8 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
*/
|
*/
|
||||||
initialize: function(name, options) {
|
initialize: function(name, options) {
|
||||||
|
|
||||||
|
this.metadata = {};
|
||||||
|
|
||||||
this.addOptions(options);
|
this.addOptions(options);
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|||||||
Reference in New Issue
Block a user