start tile & layer id's with standard strings, to avoid funky characters when later these ids are used as parameters

git-svn-id: http://svn.openlayers.org/trunk/openlayers@983 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-19 17:09:18 +00:00
parent ca8993dd68
commit 9a5f6c8d33
4 changed files with 4 additions and 4 deletions

View File

@@ -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();

View File

@@ -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_");
}
},

View File

@@ -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" );

View File

@@ -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");
}