m_select_interaction = TETHYS_MAP_VIEW.getSelectInteraction();
//to make sure that you always get something on click
var map = TETHYS_MAP_VIEW.getMap();
map.on("click", function(evt) {
var feature_collection = m_select_interaction.getFeatures();
if(feature_collection.getArray().length <=0) {
this.getLayers().forEach(function(layer, i) {
var source = layer.getSource()
if (source instanceof ol.source.Vector) {
var closest_feature = source.getClosestFeatureToCoordinate(evt.coordinate);
feature_collection.push(closest_feature);
}
});
}
});