;

      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();

      // select interaction working on &quot;click&quot;
      var selectClick &#x3D; new ol.interaction.Select({