public void addLayerListener(LayerListener ll){
  logger.fine("adding layer listener");
  listeners.add(ll);
  ll.setLayers(new LayerEvent(this,LayerEvent.ALL,getLayers()));
  ll.setLayers(new LayerEvent(this,LayerEvent.ADD,getMapLayers()));
}

public void addLayerListener ( LayerListener ll ) { logger . fine ( "adding layer listener" ) ; listeners . add ( ll ) ; ll . setLayers ( new LayerEvent ( this , LayerEvent . ALL , getLayers ( ) ) ) ; ll . setLayers ( new LayerEvent ( this , LayerEvent . ADD , getMapLayers ( ) ) ) ; }
add a layerlistener to the layerhandler , in order to be told about layers that need to be added to the map . the new layerlistener will receive two events , one telling it all the layers available , and one telling it which layers are active ( visible ) .
