Hi, I'm curious to why the initialize-constructor in Layers.js only creates the div, addd the eventlisteners etc only if this.id == null ?
Shouldn't it be more along the lines: /** * Constructor: OpenLayers.Layer * * Parameters: * name - {String} The layer name * options - {Object} Hashtable of extra options to tag onto the layer */ initialize: function(name, options) { this.addOptions(options); this.name = name; if (this.id == null) { this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); } this.div = OpenLayers.Util.createDiv(this.id); this.div.style.width = "100%"; this.div.style.height = "100%"; this.events = new OpenLayers.Events(this, this.div, this.EVENT_TYPES); if(this.eventListeners instanceof Object) { this.events.on(this.eventListeners); } if (this.wrapDateLine) { this.displayOutsideMaxExtent = true; } } Or to put it another way, am I not allowed to provide my own unique id with the options-object? best regards, Mats _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev