git-svn-id: http://svn.openlayers.org/trunk/openlayers@12031 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
30 lines
811 B
JavaScript
30 lines
811 B
JavaScript
var map;
|
|
|
|
function init() {
|
|
map = new OpenLayers.Map({
|
|
div: "map",
|
|
theme: null,
|
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
|
units: "m",
|
|
numZoomLevels: 18,
|
|
maxResolution: 156543.0339,
|
|
maxExtent: new OpenLayers.Bounds(
|
|
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
),
|
|
controls: [
|
|
new OpenLayers.Control.TouchNavigation({
|
|
dragPanOptions: {
|
|
enableKinetic: true
|
|
}
|
|
}),
|
|
new OpenLayers.Control.ZoomPanel()
|
|
],
|
|
layers: [
|
|
new OpenLayers.Layer.OSM("OpenStreetMap", null, {
|
|
transitionEffect: 'resize'
|
|
})
|
|
]
|
|
});
|
|
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
|
|
}
|