Changeset 2836
- Timestamp:
- 03/21/07 15:03:09 (2 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Map.js (modified) (1 diff)
- trunk/openlayers/tests/Control/test_OverviewMap.html (modified) (2 diffs)
- trunk/openlayers/tests/Layer/test_WMS.html (modified) (8 diffs)
- trunk/openlayers/tests/test_Map.html (modified) (1 diff)
- trunk/openlayers/tests/test_Marker.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Map.js
r2803 r2836 226 226 this.controls = null; 227 227 } 228 this.div.innerHTML = ""; 228 229 }, 229 230 trunk/openlayers/tests/Control/test_OverviewMap.html
r2803 r2836 22 22 t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 4, "Viewport div contains control div" ); 23 23 24 map.destroy(); 24 25 } 25 26 function test_03_Control_PanZoom_control_events (t) { … … 65 66 t.eq(overviewZoom, 0, "Overviewmap zoomcorrect -- second zoom"); 66 67 68 map.destroy(); 67 69 68 70 } trunk/openlayers/tests/Layer/test_WMS.html
r2803 r2836 63 63 "div first child is correct image object" ); 64 64 t.eq( tile.position.toString(), "x=5,y=6", "Position of tile is set correctly." ); 65 map.destroy(); 65 66 } 66 67 … … 73 74 t.eq( layer.grid.length, 7, "Grid rows is correct." ); 74 75 t.eq( layer.grid[0].length, 6, "Grid cols is correct." ); 75 76 map.destroy(); 76 77 } 77 78 … … 102 103 103 104 layer.grid = null; 105 map.destroy(); 104 106 } 105 107 … … 143 145 144 146 t.eq( layer.params.CHICKPEAS, "image/png", "mergeNewParams() makes clean copy of hashtable"); 147 map.destroy(); 145 148 } 146 149 … … 172 175 tUrl + "?" + OpenLayers.Util.getParameterString(tParams), 173 176 "getFullRequestString() by default does *not* add SRS value if projection is 'none'"); 177 map.destroy(); 174 178 175 179 } … … 197 201 t.eq(parseFloat(tile.imgDiv.style.opacity), 0.6, "Tile opacity is set correctly"); 198 202 203 map.destroy(); 199 204 } 200 205 201 206 function test_20_Layer_WMS_Reproject (t) { 202 207 t.plan(5); 208 203 209 var map = new OpenLayers.Map('map'); 204 210 var layer = new OpenLayers.Layer.Google("Google"); 205 211 map.addLayer(layer); 206 layer = new OpenLayers.Layer.WMS(name, url, params, {isBaseLayer: false});207 layer.isBaseLayer=false;208 map.addLayer( layer);212 wmslayer = new OpenLayers.Layer.WMS(name, url, params, {isBaseLayer: false}); 213 wmslayer.isBaseLayer=false; 214 map.addLayer(wmslayer); 209 215 map.setCenter(new OpenLayers.LonLat(0,0), 5); 210 216 var tile = layer.grid[0][0]; … … 213 219 t.eq( tile.bounds.bottom.toFixed(6), '11.178402', "bottom side matches" ); 214 220 t.eq( tile.bounds.top.toFixed(6), '21.943046', "top side matches" ); 221 map.destroy(); 215 222 216 223 var map = new OpenLayers.Map('map'); … … 220 227 var tile = layer.grid[0][0]; 221 228 t.ok( tile.bounds.equals(new OpenLayers.Bounds(-33.75, 33.75, -22.5, 45)), "okay"); 229 230 map.destroy(); 222 231 } 223 232 trunk/openlayers/tests/test_Map.html
r2541 r2836 319 319 320 320 function test_99_Map_destroy (t) { 321 t.plan( 2);321 t.plan( 3 ); 322 322 map = new OpenLayers.Map('map'); 323 323 map.destroy(); 324 324 t.eq( map.layers, null, "map.layers is null after destroy" ); 325 325 t.eq( map.controls, null, "map.controls is null after destroy" ); 326 t.eq( map.div.innerHTML, "", "map's div cleared out"); 326 327 } 327 328 // --> trunk/openlayers/tests/test_Marker.html
r2829 r2836 43 43 44 44 t.ok( !marker2.onScreen(), "marker knows it's offscreen" ); 45 45 map.destroy(); 46 46 } 47 47 … … 71 71 72 72 t.eq(parseFloat(marker.icon.imageDiv.style.opacity), 0.5, "marker.setOpacity() works"); 73 map.destroy(); 73 74 } 74 75 function test_04_Marker_moveTo(t) { … … 102 103 t.eq(marker.lonlat.lon, map.getExtent().left, "on left edge of map"); 103 104 t.eq(marker.lonlat.lat, map.getExtent().top, "on top edge of map"); 105 map.destroy(); 104 106 105 107 }
