title: Polygon Selection OpenLayers 3
body: <p>How can you select features with a polygon draw? It can be done with a square box select as per the examples.</p>
  
  <p>I'm wondering if there's a way to trigger an event after creating the polygon to go and check for intersections with it and other features. In my case I'm trying to capture datapoints.</p>
  
  <pre><code>    var select = new ol.interaction.Select();
      map.addInteraction(select);
  
      var selectedFeatures = select.getFeatures();
  
      // a DragBox interaction used to select features by drawing boxes
      var dragBox = new ol.interaction.DragBox({
          condition: ol.events.condition.platformModifierKeyOnly
      });
  
      map.addInteraction(dragBox);
  
      var infoBox = document.getElementById('info');
  
      dragBox.on('boxend', function() {
          // features that intersect the box are added to the collection of
          // selected features, and their names are displayed in the "info"
          // div
          var info = [];
          var extent = dragBox.getGeometry().getExtent();
          vectorSource.forEachFeatureIntersectingExtent(extent, function(feature) {
              selectedFeatures.push(feature);
              info.push(feature.get('name'));
          });
          if (info.length &gt; 0) {
              infoBox.innerHTML = info.join(', ');
          }
      });
  
      // clear selection when drawing a new box and when clicking on the map
      dragBox.on('boxstart', function() {
          selectedFeatures.clear();
          infoBox.innerHTML = '&amp;nbsp;';
      });
      map.on('click', function() {
          selectedFeatures.clear();
          infoBox.innerHTML = '&amp;nbsp;';
      });
  </code></pre>
  
  <p>Is this possible in open layers 3 ? </p>