diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 40bace6d57..807500e061 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -62,7 +62,7 @@ OpenLayers.Layer.prototype = { this.name = name; //generate unique id based on name - this.id = OpenLayers.Util.createUniqueID(name); + this.id = OpenLayers.Util.createUniqueID("Layer_"); if (this.div == null) { this.div = OpenLayers.Util.createDiv(); diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index d2754e1774..f0ed46b63a 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -50,7 +50,7 @@ OpenLayers.Tile.prototype = { this.size = size; //give the tile a unique id based on its BBOX. - this.id = OpenLayers.Util.createUniqueID(bounds.toBBOX()); + this.id = OpenLayers.Util.createUniqueID("Tile_"); } }, diff --git a/tests/test_Layer.html b/tests/test_Layer.html index a852d28eff..cc15c065fc 100644 --- a/tests/test_Layer.html +++ b/tests/test_Layer.html @@ -15,7 +15,7 @@ t.eq( layer.name, "Test Layer", "layer.name is correct" ); t.ok( layer.id != null, "Layer is given an id"); - t.ok( layer.id.startsWith(layer.name), "layer id starts with layer name"); + t.ok( layer.id.startsWith("Layer_"), "layer id starts correctly"); t.ok( layer.projection, "none", "default layer projection correctly set"); t.ok( ((layer.chicken == 151) && (layer.foo == "bar")), "layer.options correctly set to Layer Object" ); t.ok( ((layer.options["chicken"] == 151) && (layer.options["foo"] == "bar")), "layer.options correctly backed up" ); diff --git a/tests/test_Tile.html b/tests/test_Tile.html index ddea9016d8..180e5601c9 100644 --- a/tests/test_Tile.html +++ b/tests/test_Tile.html @@ -23,7 +23,7 @@ t.ok( tile.size.equals(size), "tile.size is set correctly" ); t.ok( tile.id != null, "tile is given an id"); - t.ok( tile.id.startsWith(bounds.toBBOX()), "tile's id starts with bbox of bounds"); + t.ok( tile.id.startsWith("Tile_"), "tile's id starts correctly"); }