give layer a unique id. udpate tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@977 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
OpenLayers.Layer = Class.create();
|
||||
OpenLayers.Layer.prototype = {
|
||||
|
||||
/** @type String */
|
||||
id: null,
|
||||
|
||||
/** @type String */
|
||||
name: null,
|
||||
|
||||
@@ -57,6 +60,10 @@ OpenLayers.Layer.prototype = {
|
||||
Object.extend(this, this.options);
|
||||
|
||||
this.name = name;
|
||||
|
||||
//generate unique id based on name
|
||||
this.id = OpenLayers.Util.createUniqueID(name);
|
||||
|
||||
if (this.div == null) {
|
||||
this.div = OpenLayers.Util.createDiv();
|
||||
this.div.style.width = "100%";
|
||||
|
||||
Reference in New Issue
Block a user