make the mobile-navigation example use an OSM layer, example only change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11499 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,17 +1,30 @@
|
|||||||
var map, layer;
|
var map;
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
map = new OpenLayers.Map('map', { controls: [
|
map = new OpenLayers.Map({
|
||||||
new OpenLayers.Control.TouchNavigation({
|
div: "map",
|
||||||
dragPanOptions: {
|
theme: null,
|
||||||
interval: 0, // non-zero kills performance on some mobile phones
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
||||||
enableKinetic: true
|
units: "m",
|
||||||
}
|
numZoomLevels: 18,
|
||||||
}),
|
maxResolution: 156543.0339,
|
||||||
new OpenLayers.Control.ZoomPanel()
|
maxExtent: new OpenLayers.Bounds(
|
||||||
] });
|
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
||||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
),
|
||||||
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
controls: [
|
||||||
{layers: 'basic'} );
|
new OpenLayers.Control.TouchNavigation({
|
||||||
map.addLayer(layer);
|
dragPanOptions: {
|
||||||
map.setCenter(new OpenLayers.LonLat(5, 40), 2);
|
interval: 0, // non-zero kills performance on some mobile phones
|
||||||
|
enableKinetic: true
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new OpenLayers.Control.ZoomPanel()
|
||||||
|
],
|
||||||
|
layers: [
|
||||||
|
new OpenLayers.Layer.OSM("OpenStreetMap", null, {
|
||||||
|
transitionEffect: 'resize'
|
||||||
|
})
|
||||||
|
]
|
||||||
|
});
|
||||||
|
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user