git-svn-id: http://svn.openlayers.org/trunk/openlayers@11223 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
46 lines
1.7 KiB
HTML
46 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<title>OpenLayers TouchNavigation Control</title>
|
|
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
|
<script src="../lib/OpenLayers.js"></script>
|
|
<script type="text/javascript">
|
|
var map, layer;
|
|
function init() {
|
|
map = new OpenLayers.Map( 'map', { controls: [
|
|
new OpenLayers.Control.TouchNavigation({
|
|
dragPanOptions: {
|
|
interval: 0, // non-zero kills performance on some mobile phones
|
|
enableKinetic: true
|
|
}
|
|
})
|
|
] });
|
|
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
|
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
|
{layers: 'basic'} );
|
|
map.addLayer(layer);
|
|
map.setCenter(new OpenLayers.LonLat(5, 40), 2);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="init()">
|
|
<h1 id="title">TouchNavigation Control</h1>
|
|
|
|
<div id="tags">
|
|
mobile, touch, drag, move, zoom, navigate
|
|
</div>
|
|
|
|
<div id="shortdesc">Demonstrate TouchNavigation Control features</div>
|
|
|
|
<div id="map" class="smallmap"></div>
|
|
<div id="docs">
|
|
This example demonstrates a couple features of the TouchNavigation
|
|
control. The TouchNavigation control controls most map dragging,
|
|
movement, zooming, etc, optimized for mobile devices.
|
|
</div>
|
|
</body>
|
|
</html>
|