1
<html xmlns="http://www.w3.org/1999/xhtml">
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">
10
map = new OpenLayers.Map( 'map', { controls: [] });
11
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
12
"http://labs.metacarta.com/wms/vmap0",
15
nav = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false});
17
map.zoomToMaxExtent();
21
<body onload="init()">
22
<h1 id="title">Navigation Control</h1>
26
<div id="shortdesc">Demonstrate Navigation Control features</div>
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>
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.