public String getSelectedFeature ( ) { if ( getNrSelectedFeatures ( ) == 1 ) { for ( VectorLayer layer : getVectorLayers ( ) ) { if ( layer . getSelectedFeatures ( ) . size ( ) > 0 ) { return layer . getSelectedFeatures ( ) . iterator ( ) . next ( ) ; } } } return null ; }
Return the selected feature if there is 1 selected feature .