added 'drawn' property to all tiles. removed redraw() and adapted all draw()s to auto handle redraw. remove getPosition() accessor that noone was using. set generic Tile's moveTo() to auto trigger the clear() and the redraw() (if desired). Update Image and WFS tile classes correspondingly. also update tests

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1198 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-12 15:54:51 +00:00
parent 0a04ee3d1b
commit 96c56e9d84
4 changed files with 105 additions and 93 deletions
+4 -2
View File
@@ -8,7 +8,9 @@
function test_01_Tile_Image_constructor (t) {
t.plan( 6 );
var layer = new Object(); //bogus layer
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
var position = new OpenLayers.Pixel(20,30);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "http://www.openlayers.org/dev/tests/tileimage";
@@ -16,7 +18,7 @@
tile = new OpenLayers.Tile.Image(layer, position, bounds, url, size);
t.ok( tile instanceof OpenLayers.Tile.Image, "new OpenLayers.Tile returns Tile object" );
t.eq( tile.layer, layer, "tile.layer is set correctly");
t.ok( tile.layer == layer, "tile.layer is set correctly");
t.ok( tile.position.equals(position), "tile.position is set correctly");
t.ok( tile.bounds.equals(bounds), "tile.bounds is set correctly");
t.eq( tile.url, url, "tile.url is set correctly");