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/Post.html | |
parent | e763ceb183f389fcd314a4a6a712d87c9d4cdb32 (diff) | |
download | postrunner-e30f267181d990947e67909de4809fa941698c85.zip |
Upgrading openlayers to 3.x
Diffstat (limited to 'misc/openlayers/tests/deprecated/Layer/WMS/Post.html')
-rw-r--r-- | misc/openlayers/tests/deprecated/Layer/WMS/Post.html | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/misc/openlayers/tests/deprecated/Layer/WMS/Post.html b/misc/openlayers/tests/deprecated/Layer/WMS/Post.html deleted file mode 100644 index d79aec5..0000000 --- a/misc/openlayers/tests/deprecated/Layer/WMS/Post.html +++ /dev/null @@ -1,89 +0,0 @@ -<html> -<head> - <script src="../../../OLLoader.js"></script> - <script src="../../../../lib/deprecated.js"></script> - <script type="text/javascript"> - var isMozilla = (navigator.userAgent.indexOf("compatible") == -1); - var isOpera = (navigator.userAgent.indexOf("Opera") != -1); - var layer; - - 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_Post_constructor (t) { - t.plan( 2 ); - - var url = "http://octo.metacarta.com/cgi-bin/mapserv"; - var options = {unsupportedBrowsers: []}; - layer = new OpenLayers.Layer.WMS.Post(name, url, params, options); - - t.eq( - layer.usePost, true, - "Supported browsers use IFrame tiles."); - - layer.destroy(); - - var options = { unsupportedBrowsers: [OpenLayers.BROWSER_NAME]}; - layer = new OpenLayers.Layer.WMS.Post(name, url, params, options); - t.eq( - layer.usePost, false, - "unsupported browsers use Image tiles."); - layer.destroy(); - } - - function test_Layer_WMS_Post_addtile (t) { - t.plan( 3 ); - - layer = new OpenLayers.Layer.WMS.Post(name, url, params); - var map = new OpenLayers.Map('map'); - map.addLayer(layer); - var bounds = new OpenLayers.Bounds(1,2,3,4); - var pixel = new OpenLayers.Pixel(5,6); - var tile = layer.addTile(bounds, pixel); - - if(isMozilla || isOpera) { - t.ok( - tile instanceof OpenLayers.Tile.Image, - "tile is an instance of OpenLayers.Tile.Image"); - } - else { - t.ok( - tile.useIFrame !== undefined, - "tile is created with the OpenLayers.Tile.Image.IFrame mixin"); - } - map.destroy(); - - // test the unsupported browser - layer = new OpenLayers.Layer.WMS.Post(name, url, params, { - unsupportedBrowsers: [OpenLayers.BROWSER_NAME] - }); - map = new OpenLayers.Map('map'); - map.addLayer(layer); - tile = layer.addTile(bounds, pixel); - t.ok( - tile instanceof OpenLayers.Tile.Image, - "unsupported browser: tile is an instance of Tile.Image"); - layer.destroy(); - - // test a supported browser - layer = new OpenLayers.Layer.WMS.Post(name, url, params, { - unsupportedBrowsers: [] - }); - map.addLayer(layer); - var tile2 = layer.addTile(bounds, pixel); - tile2.draw(); - t.eq( - tile2.useIFrame, true, - "supported browser: tile is created with the Tile.Image.IFrame mixin"); - map.destroy(); - } - - </script> -</head> -<body> -<div id="map" style="width:500px;height:550px"></div> -</body> -</html> |