public void onClick(ClickEvent clickEvent) {
// get the selected VectorLayer
Layer<?> selectedLayer = mapWidget.getMapModel().getSelectedLayer();
if (selectedLayer instanceof VectorLayer) {
// iterate all features of the selected layer
VectorLayerStore featureStore = ((VectorLayer) selectedLayer).getFeatureStore();
featureStore.getFeatures(GeomajasConstant.FEATURE_INCLUDE_GEOMETRY, new LazyLoadCallback() {
public void execute(List<Feature> features) {
boolean success = false;
Bbox selectionBounds = new Bbox(0, 0, 0, 0);
for (Feature feature : features) {