Commit initial tests for inittiles.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@119 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-05-18 03:23:17 +00:00
parent fb8bfed69e
commit 8cf86b2a10

View File

@@ -29,6 +29,16 @@
var pos = tile.getPosition();
t.eq( pos.toString(), "x=5,y=6", "Position of tile is set correctly." );
}
function test_03_Layer_WMS_inittiles (t) {
t.plan( 2 );
var map = new OpenLayers.Map($('map'));
layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'});
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0,0),5);
t.eq( layer.grid.length, 4, "Grid rows is correct." );
t.eq( layer.grid[0].length, 2, "Grid cols is correct." );
}
function test_99_Layer_WMS_destroy (t) {
t.plan( 1 );
@@ -40,5 +50,6 @@
</script>
</head>
<body>
<div id="map" style="width:500px;height:550px"></div>
</body>
</html>