[OpenLayers-Users] Don`t get WMS to run

Kai Behncke kbehncke at igf.uni-osnabrueck.de
Fri Dec 15 11:27:31 EST 2006


Hello list,
I try to get an application where I can use checkboxes to add Layers.
The problem is:
One of my two layers I don`t get to run, and I have no idea why (
in generally the layer is online, I tested it in a basic template with UMN
MapServer). For this layer (it`s the layer basemap3 (TK-100)) I just get pink
squares (????).

My code is the following:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <style type="text/css">
        #map {
            width: 800px;
            height: 475px;
            border: 1px solid black;
        }
    </style>
    <script src="../lib/OpenLayers.js"></script>
    <script type="text/javascript">
        <!--
        var lon = 10;
        var lat = 51;
        var zoom = 11;
        var map, layer;

                function init(){
	    // these should be object methods or something
            map = new OpenLayers.Map( $('map') );
            var basemap = new OpenLayers.Layer.WMS( "Germany", 
                "http://wms1.ccgis.de/cgi-bin/mapserv?",
                {map: '/data/umn/germany/germany.map', layers: 'Germany',
format: 'png', 'transparent': 'off'},
                {maxExtent: new OpenLayers.Bounds(5.60075, 47.2441, 15.425,
55.0317), maxResolution: 30000/1024, projection:"EPSG:4326" } );
               
basemap3 = new OpenLayers.Layer.WMS( "TK-100",
"http://www.mapserver.niedersachsen.de/freezoneogc/mapserverogc?", {layers:
'TK100',format: 'image/png', transparent: 'true'} );
            
            map.addLayers([basemap,basemap3]);
 
           map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
          map.addControl(new OpenLayers.Control.LayerSwitcher());
           
        }
        
        // -->
    </script>
  </head>
  <body onload="init()">
    <div id="map"></div>
  </body>
</html>

Could anybody please help me?
Thank you very much..........


--
Dipl.-Geogr. Dipl.-Umweltw. Kai Behncke

Institut für Geoinformatik und Fernerkundung (IGF)
Universität Osnabrück
Kolpingstr. 7
49074 Osnabrück

Raum: 01/308
Tel.: +49 541 969-4450
E-Mail: mailto:kbehncke at igf.uni-osnabrueck.de 
Web:  http://www.igf.uni-osnabrueck.de




More information about the Users mailing list