mapModel.getLayers().add(layer2);
selectedCount = 0;
deselectedCount = 0;
lastFeatureId = null;
layer1.addFeatureSelectionHandler(new FeatureSelectionHandler() {
public void onFeatureSelected(FeatureSelectedEvent event) {
selectedCount++;
lastFeatureId = event.getFeature().getId();
}