OpenLayers OpenLayers

Changeset 119

Show
Ignore:
Timestamp:
05/17/06 23:23:17 (3 years ago)
Author:
crschmidt
Message:

Commit initial tests for inittiles.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/tests/test_Layer_WMS.html

    r112 r119  
    3030        t.eq( pos.toString(), "x=5,y=6", "Position of tile is set correctly." ); 
    3131    } 
     32    function test_03_Layer_WMS_inittiles (t) { 
     33        t.plan( 2 ); 
     34        var map = new OpenLayers.Map($('map')); 
     35        layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'}); 
     36        map.addLayer(layer); 
     37        map.setCenter(new OpenLayers.LonLat(0,0),5); 
     38        t.eq( layer.grid.length, 4, "Grid rows is correct." ); 
     39        t.eq( layer.grid[0].length, 2, "Grid cols is correct." ); 
     40         
     41    } 
    3242 
    3343    function test_99_Layer_WMS_destroy (t) { 
     
    4151</head> 
    4252<body> 
     53<div id="map" style="width:500px;height:550px"></div> 
    4354</body> 
    4455</html>