Merge pull request #52 from fredj/deprecated.js

Move deprecated code into deprecated.js, r=ahocevar
This commit is contained in:
Frédéric Junod
2011-11-18 03:05:29 -08:00
23 changed files with 1637 additions and 2068 deletions
-7
View File
@@ -409,13 +409,6 @@
}
/** HACK HACK HACK Deprecated This test should be removed in 3.0 **/
function test_Events_globalEventObject(t) {
t.plan(1);
t.ok(Event.stop, "a stop() function exists on the global JS Event object, if indeed it exists. This is legacy deprecated and will be gone in 3.0");
}
</script>
</head>
<body>
+1 -5
View File
@@ -94,7 +94,7 @@
function test_Layer_Grid_getTilesBounds(t) {
t.plan( 4 );
t.plan(3);
layer = new OpenLayers.Layer.WMS(name, url, params);
@@ -110,10 +110,6 @@
t.ok( bounds.equals(testBounds), "getTilesBounds() returns correct bounds");
var bounds = layer.getGridBounds();
t.ok( bounds.equals(testBounds), "getGridBounds() wrapper works the same as getTilesBounds.");
//no tiles
layer.grid = [];
bounds = layer.getTilesBounds();
-27
View File
@@ -1019,33 +1019,6 @@
}
function test_Util_getArgs(t) {
//DEPRECATED -- to be removed in 3.0
t.plan(3);
OpenLayers.Lang.setCode(OpenLayers.Lang.defaultCode);
var temp = OpenLayers.Console.warn;
OpenLayers.Console.warn = function(err) {
t.ok(err != null, "warning is fired on use of getArgs()");
}
var temp2 = OpenLayers.Util.getParameters;
OpenLayers.Util.getParameters = function(url) {
t.eq(url, g_Url, "correct url passed to getParameters()");
return g_Params;
}
g_Params = {};
g_Url = {};
var ret = OpenLayers.Util.getArgs(g_Url);
t.ok( ret == g_Params, "correctly returns value from getParameters");
OpenLayers.Console.warn = temp;
OpenLayers.Util.getParameters = temp2;
}
function tests_Util_extend(t) {
t.plan(7);
@@ -2,7 +2,8 @@
<head>
<!-- multimap api key for http://(www.)openlayers.org -->
<script type="text/javascript" src="http://developer.multimap.com/API/maps/1.2/OA10072915821139765"></script>
<script src="../OLLoader.js"></script>
<script src="../../OLLoader.js"></script>
<script src="../../../lib/deprecated.js"></script>
<script type="text/javascript">
var doTest = true;
function test_Layer_MultiMap_constructor (t) {
@@ -1,6 +1,7 @@
<html>
<head>
<script src="../OLLoader.js"></script>
<script src="../../OLLoader.js"></script>
<script src="../../../lib/deprecated.js"></script>
<script type="text/javascript">
var name = "Vector Layer";
@@ -1,6 +1,7 @@
<html>
<head>
<script src="../OLLoader.js"></script>
<script src="../../OLLoader.js"></script>
<script src="../../../lib/deprecated.js"></script>
<script type="text/javascript">
var tile;
+3 -3
View File
@@ -158,7 +158,6 @@
<li>Layer/MapGuide.html</li>
<li>Layer/MapServer.html</li>
<li>Layer/Markers.html</li>
<li>Layer/MultiMap.html</li>
<li>Layer/PointGrid.html</li>
<li>Layer/PointTrack.html</li>
<li>Layer/SphericalMercator.html</li>
@@ -167,7 +166,6 @@
<li>Layer/TMS.html</li>
<li>Layer/Vector.html</li>
<li>Layer/Vector/RootContainer.html</li>
<li>Layer/WFS.html</li>
<li>Layer/WMS.html</li>
<li>Layer/WMTS.html</li>
<li>Layer/WrapDateLine.html</li>
@@ -222,7 +220,6 @@
<li>Tile.html</li>
<li>Tile/Image.html</li>
<li>Tile/Image/IFrame.html</li>
<li>Tile/WFS.html</li>
<li>Tween.html</li>
<li>Kinetic.html</li>
<li>Util.html</li>
@@ -231,5 +228,8 @@
<li>deprecated/BaseTypes/Element.html</li>
<li>deprecated/Control/MouseToolbar.html</li>
<li>deprecated/Layer/MapServer/Untiled.html</li>
<li>deprecated/Layer/MultiMap.html</li>
<li>deprecated/Layer/WFS.html</li>
<li>deprecated/Layer/WMS/Post.html</li>
<li>deprecated/Tile/WFS.html</li>
</ul>
-61
View File
@@ -1,61 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 512px;
height: 512px;
border: 1px solid gray;
}
</style>
<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></script>
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
// make map available for easy debugging
var map;
// increase reload attempts
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
function init(){
var options = {
projection: "EPSG:900913",
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508.34)
};
map = new OpenLayers.Map('map', options);
// create Virtual Earth layers
var veroad = new OpenLayers.Layer.VirtualEarth(
"Virtual Earth Raods",
{'type': VEMapStyle.Road, 'sphericalMercator': true}
);
// create WMS layer
var wms = new OpenLayers.Layer.WMS(
"World Map",
"http://world.freemap.in/tiles/",
{'layers': 'factbook-overlay', 'format':'png'},
{
'opacity': 0.4,
'isBaseLayer': false,'wrapDateLine': true
}
);
map.addLayers([veroad, wms]);
map.zoomToMaxExtent()
}
</script>
</head>
<body onload="init()">
<h3>VE Opacity</h3>
<p>The overlay should have an opacity of 40%.</p>
<div id="map"></div>
</body>
</html>