New OpenLayers.Projection.defaults property.

This allows us to simplify the map and layer configuration, because now the projection also defines defaults for maxExtent, maxResolution and units.
This change also adds transforms for SRS aliases for EPSG:4326 and centralizes axis order information in OpenLayers.Projection.defaults.
This commit is contained in:
ahocevar
2012-02-15 11:09:55 +01:00
parent da3dc76a6d
commit 11966d231f
11 changed files with 127 additions and 78 deletions

View File

@@ -12,7 +12,10 @@
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
.olControlAttribution {
bottom: 0px
bottom: 0px;
left: 2px;
right: inherit;
width: 400px;
}
#map {
height: 512px;
@@ -42,10 +45,7 @@
div: "map",
projection: "EPSG:900913",
displayProjection: "EPSG:4326",
units: "m",
numZoomLevels: 18,
maxResolution: 156543.0339,
maxExtent: [-20037508, -20037508, 20037508, 20037508],
numZoomLevels: 18
});
// create Google Mercator layers