git-svn-id: http://svn.openlayers.org/trunk/openlayers@10474 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
29 lines
726 B
JavaScript
29 lines
726 B
JavaScript
var map;
|
|
|
|
function init() {
|
|
map = new OpenLayers.Map({
|
|
div: "map",
|
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
|
units: "m",
|
|
maxResolution: 156543.0339,
|
|
maxExtent: new OpenLayers.Bounds(
|
|
-20037508, -20037508, 20037508, 20037508.34
|
|
)
|
|
});
|
|
|
|
var osm = new OpenLayers.Layer.OSM();
|
|
var gmap = new OpenLayers.Layer.Google("Google Streets");
|
|
|
|
map.addLayers([osm, gmap]);
|
|
|
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
|
|
|
map.setCenter(
|
|
new OpenLayers.LonLat(10.2, 48.9).transform(
|
|
new OpenLayers.Projection("EPSG:4326"),
|
|
map.getProjectionObject()
|
|
),
|
|
5
|
|
);
|
|
}
|