]> dev.renevier.net Git - syp.git/blob - openlayers/examples/navigation-control.html
fixes notices
[syp.git] / openlayers / examples / navigation-control.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>OpenLayers Navigation Control</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">
8         var map, layer;
9         function init(){
10             map = new OpenLayers.Map( 'map', { controls: [] });
11             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
12                     "http://labs.metacarta.com/wms/vmap0",
13                     {layers: 'basic'} );
14             map.addLayer(layer);
15             nav = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false});
16             map.addControl(nav);
17             map.zoomToMaxExtent();
18         }
19     </script>
20   </head>
21   <body onload="init()">
22     <h1 id="title">Navigation Control</h1>
23
24     <div id="tags"></div>
25
26     <div id="shortdesc">Demonstrate Navigation Control features</div>
27
28     <div id="map" class="smallmap"></div>
29     <a href="#" onclick="nav.enableZoomWheel();return false">Turn on Wheel Zoom</a> | <a href="#" onclick="nav.disableZoomWheel(); return false;">Turn off Wheel Zoom</a>
30     <div id="docs">
31         This example demonstrates a couple features of the Navigation control. The Navigation control controls most map dragging, movement, zooming, etc. In this case, we have a demonstration of how to create a navigation control with no zoom wheel action, which can then be enabled or disabled by the user.
32     </div>
33   </body>
34 </html>