mobile-navigation example - place the JS code in a separate file, no functional change

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-02-22 12:08:30 +00:00
parent 36f5232dd6
commit ab309197e2
2 changed files with 28 additions and 22 deletions

View File

@@ -0,0 +1,17 @@
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
}
}),
new OpenLayers.Control.ZoomPanel()
] });
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);
}