1
<html xmlns="http://www.w3.org/1999/xhtml">
3
<title>OpenLayers: Single Tile</title>
4
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5
<link rel="stylesheet" href="style.css" type="text/css" />
6
<script src="../lib/OpenLayers.js"></script>
7
<script type="text/javascript">
10
map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
12
var old_ol_wms = new OpenLayers.Layer.WMS.Untiled( "WMS.Untiled",
13
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
14
old_ol_wms.addOptions({isBaseLayer: true});
16
var new_ol_wms = new OpenLayers.Layer.WMS( "WMS w/singleTile",
17
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},
18
{ singleTile: true, ratio: 1 } );
19
new_ol_wms.addOptions({isBaseLayer: true});
21
map.addLayers([old_ol_wms, new_ol_wms]);
22
map.addControl(new OpenLayers.Control.LayerSwitcher());
23
map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4);
27
<body onload="init()">
28
<h1 id="title">Untiled Example</h1>
30
Create an untiled WMS layer using the singleTile: true, option or the deprecated
33
<div id="mapDiv" class="smallmap"></div>
34
<p> The first layer is an old OpenLayers.Layer.WMS.Untiled layer, using
35
a default ratio value of 1.5.
36
<p> The second layer is an OpenLayers.Layer.WMS layer with singleTile set
37
to true, and with a ratio of 1.