r({
  source: new ol.source.Vector({
    url: &#x27;https://openlayers.org/en/v4.6.5/examples/data/geojson/countries.geojson&#x27;,
    format: new ol.format.GeoJSON()
  })
});

var map &#x3D; new ol.Map({
  layers: [raster, vector],
  target: &#x27;map&#x27;,
  view: new ol.View({
    center: [0, 0],
    zoom: 2
  })
});

var select &#x3D; null;  // ref to currently selected interaction

// select interaction working on &quot;singleclick&quot;
var selectSingleClick &#x3D; new ol.interaction.Select();

// s