code: @Override
  	public boolean addLayer(Layer layer) {
  		if (layer == null) {
  			throw new IllegalArgumentException("Layer is null.");
  		}
  		if (getLayer(layer.getId()) == null) {
  			layers.add(layer);
  			if (layer instanceof AbstractLayer) {
  				AbstractLayer aLayer = (AbstractLayer) layer;
  				aLayer.setViewPort(viewPort);
  				aLayer.setEventBus(eventBus);
  			}
  			eventBus.fireEvent(new LayerAddedEvent(layer));
  			return true;
  		}
  		return false;
  	}
docs: ------------------------------------------------------------------------