Concise config. No init.

This commit is contained in:
tschaub
2011-10-28 15:51:36 -06:00
parent 58cc225b9b
commit bea1a5b24a

View File

@@ -24,7 +24,7 @@
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
</head> </head>
<body onload="init()"> <body>
<h1 id="title">OpenLayers Spherical Mercator Example</h1> <h1 id="title">OpenLayers Spherical Mercator Example</h1>
<div id="tags"> <div id="tags">
@@ -39,17 +39,14 @@
<div id="docs"></div> <div id="docs"></div>
<script type="text/javascript"> <script type="text/javascript">
var maxExtent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508), var map = new OpenLayers.Map({
restrictedExtent = maxExtent.clone(), div: "map",
maxResolution = 156543.0339;
map = new OpenLayers.Map('map', {
projection: new OpenLayers.Projection("EPSG:900913"), projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"), displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m", units: "m",
numZoomLevels: 18, numZoomLevels: 18,
maxResolution: maxResolution, maxResolution: 156543.0339,
maxExtent: maxExtent maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508),
}); });
// create Google Mercator layers // create Google Mercator layers