Hello,

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;

map.events.register("changebaselayer", map, function (closeevt)

{closeLayerSwitcher(closeevt)});


At last, you need a function to close the LayerSwitcher:

function closeLayerSwitcher(closeevt)

{

    if(closeevt.layer.name!=this.name){

    layerswitcher.minimizeControl();

    }

}


Best regards,
D. Ströer

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to