1 <html xmlns="http://www.w3.org/1999/xhtml">
3 <title>OpenLayers Boxes Example</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">
11 [-122.6, 37.6, -122.3, 37.9],
16 map = new OpenLayers.Map('map');
18 var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
19 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
21 var boxes = new OpenLayers.Layer.Vector( "Boxes" );
23 for (var i = 0; i < box_extents.length; i++) {
25 bounds = new OpenLayers.Bounds(ext[0], ext[1], ext[2], ext[3]);
27 box = new OpenLayers.Feature.Vector(bounds.toGeometry());
28 boxes.addFeatures(box);
31 map.addLayers([ol_wms, boxes]);
32 map.addControl(new OpenLayers.Control.LayerSwitcher());
33 var sf = new OpenLayers.Control.SelectFeature(boxes);
36 map.zoomToMaxExtent();
40 <body onload="init()">
41 <h1 id="title">Boxes Example</h1>
47 Demonstrate marker and box type annotations on a map.
50 <div id="map" class="smallmap"></div>