this.mapInfo = mapInfo;
this.viewPort = viewPort;
this.eventBus = eventBus;
// Add a layer selection handler that allows only one selected layer at a time:
eventBus.addHandler(LayerSelectionHandler.TYPE, new LayerSelectionHandler() {
public void onSelectLayer(LayerSelectedEvent event) {
for (Layer<?> layer : layers) {
if (layer.isSelected() && !layer.equals(event.getLayer())) {
layer.setSelected(false);