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:
1 parent
3f07472d5d
commit
f71f3d0cfb
2 files changed
+10
-1
No files matched your search
@@ -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