- All Known Implementing Classes:
- BasicLayerConfigurationListener
public interface LayerConfigurationListener
A LayerConfigurationListener is a component that receives LayerEvents from
the LayerHandler before changes are implemented, so conditions can be
implemented to the layer list. These conditions may include controlling which
layers are enabled at the same time, or controlling the projection used when
certain layers are activated.
You can add this component to the components property in the
openmap.properties file, or simply add it to the MapHandler. The LayerHandler
will find it and add it as a listener, and then start making calls to the
checkLayerConfiguration method.
The LayerConfiguratListener.checkLayerConfiguration(List layers) is called
before new changes are applied to the layer cake in the application. If
changes are desired, they should be returned from this method. If no changes
are required, then null should be returned. You should only return something
from this method if the layer order is modified, or layers should be added or
removed from the LayerHandler. If you add or remove layers here, they will
not be added to the MapHandler.
- Author:
- dietrick