Estoy intentando superponer un mapa de geoserver con proyección EPSG:3021 con Google Streets y OpenStreetmap. Alguien sabe por qué sigo llegando a la isla nula (se supone que es sobre la ciudad de Lund, Suecia) y también por qué el mapa de Google Street no se muestra?
<script>
//Defining projections
var geographic = new OpenLayers.Projection("EPSG:3021");
var mercator = new OpenLayers.Projection("EPSG:900913");
//Defining bounds
var world = new OpenLayers.Bounds(13.12, 55.67, 13.27, 55.74).transform(
geographic, mercator
);
//Defining map center
var lund_center = new OpenLayers.LonLat(13.19, 55.71).transform(
geographic, mercator
);
var options = {
projection: mercator,
displayProjection: geographic,
units: "m",
maxExtent: world,
maxResolution: 156543.0399,
};
//Defining main variables
var map = new OpenLayers.Map("map", options, { controls: [] });
var osm = new OpenLayers.Layer.OSM();
map.addLayer(osm);
var gmap = new OpenLayers.Layer.Google("Google Streets");
map.addLayer(gmap);
//List of layers
var lund = new OpenLayers.Layer.WMS(
"Stadsdelar",
"http://localhost:8080/geoserver/wms",
{layers: "lundpr:Stadsdelar",
transparent: true}
);
map.addLayer(lund);
///////////////////////////////////////
var vagar = new OpenLayers.Layer.WMS(
"vagar_alla",
"http://localhost:8080/geoserver/wms",
{
layers: "lundpr:vagar_alla",
transparent: "true",
format: "image/png"
},
{isBaseLayer: false, visibility: true}
);
map.addLayer(vagar);
///////////////////////////////////////
//Map center and zoom
map.setCenter(lund_center, 14);
//List of controls
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.KeyboardDefaults());
map.addControl(new new OpenLayers.Control.Navigation());
//Coordinates of mouse position
map.addControl(new OpenLayers.Control.MousePosition());
</script>