diff options
author | Chris Schlaeger <chris@linux.com> | 2015-10-17 21:36:38 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2015-10-17 21:36:38 +0200 |
commit | e30f267181d990947e67909de4809fa941698c85 (patch) | |
tree | 46e9f94c2b3699ed378963b420b8a8d361286ea1 /misc/openlayers/tests/deprecated/Layer/WMS.html | |
parent | e763ceb183f389fcd314a4a6a712d87c9d4cdb32 (diff) | |
download | postrunner-e30f267181d990947e67909de4809fa941698c85.zip |
Upgrading openlayers to 3.x
Diffstat (limited to 'misc/openlayers/tests/deprecated/Layer/WMS.html')
-rw-r--r-- | misc/openlayers/tests/deprecated/Layer/WMS.html | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/misc/openlayers/tests/deprecated/Layer/WMS.html b/misc/openlayers/tests/deprecated/Layer/WMS.html deleted file mode 100644 index 43977c8..0000000 --- a/misc/openlayers/tests/deprecated/Layer/WMS.html +++ /dev/null @@ -1,60 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <!-- this gmaps key generated for http://openlayers.org/dev/ --> - <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script> - <script src="../../OLLoader.js"></script> - <script src="../../../lib/deprecated.js"></script> - <script type="text/javascript"> - - var name = 'Test Layer'; - var url = "http://octo.metacarta.com/cgi-bin/mapserv"; - var params = { map: '/mapdata/vmap_wms.map', - layers: 'basic', - format: 'image/jpeg'}; - - function test_Layer_WMS_Reproject (t) { - var validkey = (window.location.protocol == "file:") || - (window.location.host == "localhost") || - (window.location.host == "openlayers.org"); - if (OpenLayers.BROWSER_NAME == "opera" || OpenLayers.BROWSER_NAME == "safari") { - t.plan(1); - t.debug_print("Can't test google reprojection in Opera or Safari."); - } else if(validkey) { - t.plan(5); - - var map = new OpenLayers.Map('map', {tileManager: null}); - var layer = new OpenLayers.Layer.Google("Google"); - map.addLayer(layer); - var wmslayer = new OpenLayers.Layer.WMS(name, url, params, - {isBaseLayer: false, reproject:true, buffer: 2}); - wmslayer.isBaseLayer=false; - map.addLayer(wmslayer); - map.setCenter(new OpenLayers.LonLat(0,0), 5); - var tile = wmslayer.grid[0][0]; - t.eq( tile.bounds.left, -22.5, "left side matches" ); - t.eq( tile.bounds.right, -11.25, "right side matches" ); - t.eq( tile.bounds.bottom.toFixed(6), '11.781325', "bottom side matches" ); - t.eq( tile.bounds.top.toFixed(6), '22.512557', "top side matches" ); - map.destroy(); - } else { - t.plan(1); - t.debug_print("can't test google layer from " + - window.location.host); - } - - var map = new OpenLayers.Map('map', {tileManager: null}); - layer = new OpenLayers.Layer.WMS(name, url, params, {buffer: 2}); - map.addLayer(layer); - map.setCenter(new OpenLayers.LonLat(0,0), 5); - var tile = layer.grid[0][0]; - t.ok( tile.bounds.equals(new OpenLayers.Bounds(-33.75, 33.75, -22.5, 45)), "okay"); - - map.destroy(); - } - </script> -</head> -<body> -<div id="map" style="width:500px;height:550px"></div> -</body> -</html> |