[GIS] openlayers – wms – map not loading – what Bounds/Extent/Scale to use

openlayers-2wms

I simply want a map on a webpage where I can zoomin and zoomout and navigate around.
I'm working on this for 4 days now, and can't get it to work:

I want to display the map using a WMS-service here in Austria with Openlayers. Here's the getCap XML:

http://gis.lebensministerium.at/wmsgw/?key=6ae2a41178c77ccee1db7248c9f92b04&VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS

so this is my openlayers code:

function init() {
    map = new OpenLayers.Map("map", {
        controls : map_controls
            });
    wms = new OpenLayers.Layer.WMS("GIS", "http://gis.lebensministerium.at/wmsgw/", {
        layers : 'Orthophoto,Luftbild_MR,Luftbild_1m,Luftbild_8m,Satellitenbild_30m',
        key : '6ae2a41178c77ccee1db7248c9f92b04'
            }, {
                projection : new OpenLayers.Projection('EPSG:31287'),
                maxExtent : new OpenLayers.Bounds(110000, 250000, 690000, 590000)
            });
    map.addLayer(wms);
    if(!map.getCenter()) {
        map.zoomToMaxExtent();
    }}

and here's the link to take a look at the actual page: myMapSite

but it should look something like this (made it with an desktop app): Link_to_Picture

(I think the small rectangles are due to the free service and to not use it commercially)

So basically I want to see the whole map and then zoom in.

Since the only way to see a map (although the zoom-factor is way off) was to set the maxExtend with the boundingBox values from the getCapabilities-xml file, I'm assuming that my Bounds/Extent/Scale is wrong?

But what values should I use? or is there another problem?

I'm really desperate…

Best Answer

Try setting the property maxResolution on the map object:

map = new OpenLayers.Map("map", {
    controls : map_controls,
    maxResolution: 1000
});