Proj4js.defs["EPSG:23030"] = "+proj=utm +zone=30 +ellps=intl +towgs84=-131,-100.3,-163.4,-1.244,-0.020,-1.144,9.39 +units=m +no_defs ";

Map.baseLayers = {
    defaultCentre: [-3.57138, 39.8384, 0], // centre of Spain
    m_mousePrefix: "UTM ",
    mapOptions: {
        projection: "EPSG:23030",
        maxExtent: new OpenLayers.Bounds(-100000, 3950000, 1150000, 4900000),
        resolutions: [1800,900,450,225,120,50,25,10,4.5,3,2,1,0.5],
        // = scales[5M,3M,1M,638k,340k,142k!,71k,28k!,13k,8504,5669,2835,1417]
        tileSize: new OpenLayers.Size(200, 200)
    },
    get: function() {
        return [
            new OpenLayers.Layer.WMS( "IGN topo",
                "http://www.idee.es/wms/MTN-Raster/MTN-Raster",
                {layers: 'mtn_rasterizado'},
                { 'buffer': 0, attribution: 'IGN topo maps from <a target="_blank" href="http://www.idee.es/">IDEE</a>' }
            ),
            new OpenLayers.Layer.WMS( "PNOA aerial/topo",
                "http://www.idee.es/wms/PNOA/PNOA",
                {layers: 'pnoa'},
                {'buffer': 0, attribution: 'PNOA photos from <a target="_blank" href="http://www.idee.es/">IDEE</a>' }
            ),
            new OpenLayers.Layer.WMS( "CartoCiudad",
                "http://www.cartociudad.es/wms/CARTOCIUDAD/CARTOCIUDAD",
                {layers: 'Toponimo,Portal,Vial,FondoUrbano'},
                {'buffer': 0, attribution: 'Street maps from CartoCiudad' }
            )
        ]
    }
}
