Files
openlayers/examples/notile.html
crschmidt 7da6a3540e Merge the excellent documentation work done during foss4g into trunk. Many
thanks to all the contributors who helped put this together. 
I'm not exactly sure of what's going to happen with this, but for now,
at http://openlayers.org/dev/doc/examples.html you can see links to all the
examples *with descriptions*. Hooray!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5362 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-08 14:21:53 +00:00

44 lines
1.6 KiB
HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#mapDiv {
width: 400px;
height: 400px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init(){
map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
var old_ol_wms = new OpenLayers.Layer.WMS.Untiled( "WMS.Untiled",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
old_ol_wms.addOptions({isBaseLayer: true});
var new_ol_wms = new OpenLayers.Layer.WMS( "WMS w/singleTile",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},
{ singleTile: true, ratio: 1 } );
new_ol_wms.addOptions({isBaseLayer: true});
map.addLayers([old_ol_wms, new_ol_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4);
}
</script>
</head>
<body onload="init()">
<h1 id="title">Untiled Example</h1>
<p id="shortdesc">
Create an untiled WMS layer using the singleTile: true, option or the deprecated
WMS.Untiled layer.
</p>
<div id="mapDiv"></div>
<p> The first layer is an old OpenLayers.Layer.WMS.Untiled layer, using
a default ratio value of 1.5.
<p> The second layer is an OpenLayers.Layer.WMS layer with singleTile set
to true, and with a ratio of 1.
</body>
</html>