<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <meta http-equiv="CONTENT-TYPE" content="text/html;
      charset=ISO-8859-15">
    Hello,<br>
    <br>
    I found a simple solution by myself. The Layerswitcher have to be a
    global variable. Within the function init() you have to register an
    event;<br>
    <p style="margin-bottom: 0cm" lang="zxx">
      map.events.register("changebaselayer", map, function (closeevt)</p>
    <p style="margin-bottom: 0cm" lang="zxx">
      {closeLayerSwitcher(closeevt)});</p>
    <p style="margin-bottom: 0cm" lang="zxx"><br>
      At last, you need a function to close the LayerSwitcher:<br>
    </p>
    <p style="margin-bottom: 0cm" lang="zxx"></p>
    <p style="margin-bottom: 0cm" lang="zxx"> function
      closeLayerSwitcher(closeevt)</p>
    <p style="margin-bottom: 0cm" lang="zxx"> {</p>
    <p style="margin-bottom: 0cm" lang="zxx">    
      if(closeevt.layer.name!=this.name){</p>
    <p style="margin-bottom: 0cm" lang="zxx">    
      layerswitcher.minimizeControl();</p>
    <p style="margin-bottom: 0cm" lang="zxx">     }</p>
    <p style="margin-bottom: 0cm;" lang="zxx"> }<br>
    </p>
    <p style="margin-bottom: 0cm" lang="zxx"><br>
      Best regards,<br>
      D. Ströer<br>
    </p>
    <title></title>
    <meta name="GENERATOR" content="LibreOffice 3.5 (Windows)">
    <style type="text/css">
        <!--
                @page { margin: 2cm }
                P { margin-bottom: 0.21cm; so-language: zxx }
                A:link { so-language: zxx }
        -->
        </style>
  </body>
</html>